C++ question UObjects (noob question) RESOLVED

[RESOLVED]

Hello. I haven’t luck doing my first thing in C++. I check other codes, read a lot code (i missed a lot anyway yet) but still getting stuck in things that must be “something basic”.

What i doing wrong in that basic code? i init in BP the two object, then Set, and then Get, and get nothing.

/*

*/

#pragma once

#include "DeskCaptureObj.h"

#include "DeskCapturePlugin.generated.h"


UCLASS(BlueprintType, Blueprintable)
class DESKCAPTUREPLUGIN_API UDeskCapture : public UObject
{
	GENERATED_UCLASS_BODY()

	UFUNCTION(BlueprintPure, meta = (DisplayName = "Construct DeksCapture", HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"), Category = "Desk Capture")
	static UDeskCapture* DeskCaptureInit(UObject* WorldContextObject);

	UFUNCTION(BlueprintCallable, Category = "Desk Capture")
		UDeskCaptureObj* GetObj();
	UFUNCTION(BlueprintCallable, Category = "Desk Capture")
		void SetObj(UDeskCaptureObj* Obj);


protected:
	UPROPERTY()
	UDeskCaptureObj* CaptureObj;
};

#include "DeskCapturePluginPrivatePCH.h"




class DeskCaptureObj;


UDeskCapture::UDeskCapture(const class FObjectInitializer& PCIP)
	: Super(PCIP)
{

}

UDeskCapture* UDeskCapture::DeskCaptureInit(UObject* WorldContextObject)
{
	return NewObject<UDeskCapture>();
}

UDeskCaptureObj* UDeskCapture::GetObj() 
{
	return CaptureObj;
}

void UDeskCapture::SetObj(UDeskCaptureObj* Obj)
{
	CaptureObj = Obj;
}

/*
*/
#pragma once

#include "DeskCaptureObj.generated.h"

UCLASS(BlueprintType, Blueprintable)
class DESKCAPTUREPLUGIN_API UDeskCaptureObj : public UObject
{
	GENERATED_UCLASS_BODY()

		UFUNCTION(BlueprintPure, meta = (DisplayName = "Construct DeksCapture Object", HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"), Category = "Desk Capture")
		static UDeskCaptureObj*  DeskCaptureObjectInit(UObject* WorldContextObject);




};
/*
*/

#include "DeskCapturePluginPrivatePCH.h"

UDeskCaptureObj::UDeskCaptureObj(const class FObjectInitializer& PCIP)
	: Super(PCIP)
{

}


UDeskCaptureObj* UDeskCaptureObj::DeskCaptureObjectInit(UObject* WorldContextObject)
{
	return NewObject<UDeskCaptureObj>();
}

wtf! i connect the Get to the Construct Init, lost hours checking and reading for what i doing wrong because of that…

Need a coffe and gun.

RESOLVED :confused: