CreateSubDefaultObject from TSubClassOf UProperty

Hey guys,

I wish to spawn a component on my actor’s constructor. The Constructor Runtime is When I want to run this, and NewObject is preferably not what I’m looking for.

My Property looks as follows:

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "World Basic - Admin")
	TSubclassOf<class UWorld_Standard> Interaction_World_Class = UWorld_Standard::StaticClass();

How do I add the Constructor code? Usually, if you specifically know the class, it’d be

CC_Interaction_World = CreateDefaultSubobject<UWorld_Standard>(TEXT("World_Standard"));

However, how would it be with the Property Value Inserted?

IIRC, CreateDefaultSubobject should only be called from the constructor of your actor (or similar). Now the constructor is run when you start the editor, and at this point there is no way to have specified the TSubclassOf variable yet. So I don’t know if it is possible to create a dynamic component this way. I can look at it when I’m at my computer, if still needed.

I would greatly appreciate it if you can look into this as I have been unable to figure this out so far.