I found about four different ways to instantiate the object, but not sure if my understanding are clear.
NewObject<T>()function used when we want to make at the instance of
UObject. For example, it can be any ActorComponents.
USomeComponent sc = NewObject<USomeComponent> (class);
ConstructObject<T>()one more way to init
CreateDefaultSubobject<T>()but using this one function we also can create an instance of any class inherited from
So first question: What is the difference if we can use these functions for one purpose? How and when and why we need to use any of them?
SpawnActor<T>()used for instantiating an object of
Question two: Is it a fine way to init
Actor's? What is the place in the game when we need to init exactly
Actors? Write, please, any example except for
ConstructorHelpers::FObjectFinder<T>()pretty clear scope of using. To load and set up assets. Can this method be useful in some other place?