When is valid time to create Subobjects/Components?
I'm trying to create instances of components and attach them to my object, but I get the following error:
I tried calling it this way, in various places:
It throws the error if I call it from
Is it really impossible to call it outside the constructor?
asked Aug 15 '16 at 10:46 AM in C++ Programming
You can create SubObjects/Components anywhere. You can only call CreateDefaultSubobject from the constructor.
To create a component at runtime you must use ConstructObject().
There may be a compiler error with missing args in AttachTo, but this is how you create and attach components at runtime.
Follow this question
Once you sign in you will be able to subscribe for any updates here