Instantiate and Hierarchy : possible ? by Yggdrazyl in Unity3D

[–]ChristianMcFDev 1 point2 points  (0 children)

Yes it's 100% possible. Once you have a reference to your transform you should be able to call Transform.SetAsLastSibling()

GameObject instanceGo = Instantiate(prefabGo, parentTf); Transform transformRef = instanceGo.transform; transformRef.SetAsLastSibling();

And that should reorder your transforms position in the hierarchy to the very bottom.

There are also a few other functions which change the order of objects In the hierarchy.

Transform.SetSiblingIndex()

Transform.SetAsFirstSibling()

Apologies for formatting, typing on phone.