What I want to do:
Create a USceneComponent at Runtime in an Actor class
USceneComponent* UnitDesign = NewObject<USceneComponent>(this, FName(*ID));
What works:
Defining UnitDesign
at Header File(.h) works without issues…
UPROPERTY(VisibleAnywhere) //I can see UnitDesign in World Outliner
USceneComponent* UnitDesign = NewObject<USceneComponent>(this, FName(*ID));
What does not work for me:
Defining UnitDesign
at CPP File(.cpp) inside BeginPlay() of Actor class-
UPROPERTY(VisibleAnywhere) //I can NOT see UnitDesign in World Outliner
USceneComponent* UnitDesign = NewObject<USceneComponent>(this, FName(*ID));
Any pointers appreciated.