Attaching Component at runtime
I have a class that has a two dimensional array for storing pointers to UMyField Objects. I have to fill that array in the BeginPlay() method, because I don't have the object's bounds or properties from the editor in the constructor. The Engine crashes when I try to attach the component to the root component. Here's the code: UMyField* NewField = NewObject(UMyField::StaticClass()); NewField->AttachTo(RootComponent); Fields[i].Add(NewField); what do I have to do?
asked Sep 02 '15 at 07:35 PM in C++ Programming
Follow this question
Once you sign in you will be able to subscribe for any updates here