Hello,
Is there a hook of some kind that can detect when a GameObject is added into the Scene Hierarchy?
The plan is to evaluate these new objects and set their correct parent automatically.
Thanks
Hello,
Is there a hook of some kind that can detect when a GameObject is added into the Scene Hierarchy?
The plan is to evaluate these new objects and set their correct parent automatically.
Thanks
I think a good starting point is to use OnHierarchyChange, after that you can find all the gameobjects in the scene and perform the reparenting.
Actions that trigger this message
include creating, renaming,
reparenting, or destroying objects in
the current hierarchy
The ideal would be to have an event that brings the newly created object as an argument, but I donβt know that there is one available.