How to reference Uobject editor values

Hi,

So i have this Uobject

UPROPERTY(EditAnywhere, Category = "Our Spawning Object")
	TSubclassOf<UObject> ourSpawnObject;

But now i want to set that UObject’s InitialLifeSpan() .
And im guessing the below code doesnt work like how i thought it would work… (i came from c# unity)

	ourSpawnObject.InitialLifeSpan(1.0f);

Some assistance to nudge me in the right direction would be nice.

Hi ,

It seems this forum is not that active as i thought. Anyways, you can’t just call InitialLifeSpan() on an uobject, as i believe it belongs to the AActor Class.
So because of that , i changed ourSpawnObject type to AActor

PS: Also apparently just using SetLifeSpan() on the .cpp file itself seems to crash the entire project and make it unable to open at all.