Graph is linked to private object(s) in an external

Ok, I resolved the problem but can someone kindly explain why it happened in the first place… Originally I had a component that has multiple children of UObject type , so it had something like this in the class declaration:

 UPROPERTY()
 TArray<Child*> _children; 


Then in AddChild function it had something like:

Child* child = NewObject<Child>(); 
_children.Add(child). 

This component was attached to actor, and then I had a blueprint that was derived from that actor , and in the construction script it was calling this AddChild function. And if I were to insert this blueprint into level and try to save I’d get an error about “graph linked to private objects /transient, etc”. After an hour of debugging and slicing and dicing the code I actually found out that the solution was very simple. Just passing Outer* to be “this” of the parent that’s creating these children. So :

Child* child = NewObject<Child>(this);

That simple change fixed the problem.

Is there anyone that could explain why this Outer mattered here. How do these relationships work and why is it that not passing Outer as this was causing these problems. Any good links about this relation between Outer object and children? Thanks

Hi ,

Would the information contained in this forum post be of any help?

If not and you need more clarification, please let me know and I’ll be happy to help.

Have a nice day,