NewObject destroyed when exiting Unreal Engine
I'm currently working with TMap that contains a FString as key and my custom UObject class as value, and I fill it in C++ by creating new pointers ( using NewObject() ).
But when exiting the editor, pointers are destroyed and at launch TMap values are empty. (not TMap keys)
I tried adding parameters to NewObject : this as Outer parameter and MyClass::StaticClass as class param eter. But I get an issue when saving my scene (graph is linked to external private object)
Do you have any idea to tell the engine to store my pointers? I thought about the Register function but I don't know which parameters to give.
Thank you in advance!
asked Apr 10 '19 at 09:15 AM in C++ Programming
Found a solution : I needed to set Outer parameter with "this" instance, and next, to set the flag RF_Public to the created object.
answered Apr 11 '19 at 08:47 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here