Parent objects in scene

Hello. I’m trying to parent an object in the scene (not an actor’s component).

I found Set Folder Path, but I want to have it inside another object, I can do that directly in the Scene Outliner, but I need that from code.

Thank you.

I believe the scene hierarchy might be implemented through the transform. I am noob myself, but if you find the Transform component of an object try looking for a parent in there

Hey Tobias

I’m not clear what you mean by “parent”? If you mean you want something to inherit from a class of object, then use “Add Code to Project” in the file menu and choose the class that you want your new object to inherit from. If you mean you want to attach it to an actor then follow something like this;

Or this;

Or, if you want the object to be carried or contained by another object, then make an array in the “parent”, of the class type of the object that you want to be carried, and then load it into that. Unload it when you want to access it.

I hope that helps! Add a comment if any of this is unclear or I havent covered what you want to do…

I think he ment that in the hierarchy in the scene he wants the ability to place actors under other actors

Thanks for the answer, robbiecooper, but I was actually refering to what TinyTealTree said: To put a object inside another in the hierarchy of the scene but from code or blueprint. In Unity it was something like object1.transform.parent = object2.transform;

Nope, I was wondering the same (like in Unity: transform.parent) but there isn’t any property like that :S

The difference between Unity and Unreal in this regard is that each Unreal class has an in built heirarchy inside of it. and you can parent it over there in code with ->AttachParent = or something like that. I approve that it creates a confusion because the main hierarchy is somewhat ambiguous towards what its supposed to be doing.


Maybe a bit too late, but this is the way I do it: