#Auto parent to scene's Default Parent

1 messages · Page 1 of 1 (latest)

old arrow
#

In Unity 2021, there is a way to set a gameobject in the Hierarchy as the scene's Default Parent, which would auto parent new objects to that gameobject. It's pretty useful, but I have no idea how to do that when using a MenuItem to create a custom gameobject. There doesn't seem to be a way to "get" the current scene's Default Gameobject, but I've seen some third party assets do this.

How can this be done? Thanks.

vivid yacht
old arrow
# vivid yacht I've never heard of such feature in any of the unity versions. Are you sure it w...

Couldn't find a doc exactly, but here's a video of it: https://www.youtube.com/watch?v=scLdlsqfRlw

I don't know if it was in any versions prior to 2021 but that was when I noticed it

Unity Tips - How to set a game object as the default parent in a scene.

This can be really useful when level editing by automatically adding new objects dragged into the scene under a root level object to keep your scene nicely organised!

Support this channel:
🙏 https://www.patreon.com/thekiwicoder

Follow Me:

🥝 Website: http://www.the...

▶ Play video
vivid yacht
#

Just checked unity 6.1 and context menu option is still there.

old arrow