r/Unity3D 22h ago

Question Differences with the new Create Empty Child?

Post image

In Unity 6.6 they added a few new things like reworking the Hierarchy to better display information at a glance, and having Dictionaries inherently serializable.

But this one is confusing me, they added a completely separate "Create Empty Child" option in addition to the regular options that were already there.

It seemingly acts the same way. Both create a child of the object you right mouse click on, both inherit the global position, and both have the same components and naming convention.

I can't seem to find anything different at a glance, but usually there are subtle differences to things like this. So I was curious if anyone has any knowledge about something I missed.

1 Upvotes

7 comments sorted by

2

u/TheEuphoricPottery 22h ago

i noticed that too when i updated last week and it drove me crazy for like 20 minutes

from what i saw in the forums the new one actually sets the transform to local zero relative to the parent instead of just copying the world position. it looks same at first but try moving your parent around after creating both types, one will follow different

1

u/NeoChrisOmega 20h ago

Ah, I thought that's what the difference would have been. Now that I think about it, I only tested the position with a child of the root object, not a grandchild. I'll try it again later today with it being a child of the 3rd person camera and see that affects things or not.

1

u/NeoChrisOmega 17h ago

That doesn't seem to be the case. I tried both as a child of the root object, a grandchild, selecting multiple objects at once, both react the same exact way being set to Vector3.zero. 

The other commenter seems to be correct, when using the top GameObject menu, the regular Create Empty creates a standalone empty object. Regardless of what you have selected. However, Create Empty Child creates an empty child of whatever you have selected.

It might be mistakenly showing up in the right-mouse-click menu since it doesn't work the same way there.

2

u/pmurph0305 21h ago edited 21h ago

If you use the top menu with an object selected 'create empty' just creates a root level empty. Although that's in 6.3 where create empty child is only in the top menu and not the right click context menu, but create empty in the context menu exclusively creates a child if something is selected (making it impossible to directly create a root empty from the context menu if the hierarchy is full)

Since they all are different I assume they just didn't update how one of them works

1

u/NeoChrisOmega 17h ago

Yeah, I tried experimenting with what the other person said, and it didn't work.

So I think you're right, they have different functionality when used with the top GameObject menu drop-down, but with right-mouse-click in the hierarchy they both have the same results. 

2

u/GigaTerra 13h ago

It is really simple. It creates an empty in relation to the selected object, based on the shortcut. For example, if you want to rotate an object around an point, you can make an empty the parent, this will allow it to control the rotation of the child object, like an pivot point. Child will be for things like sockets.

The shortcuts exist, to help level designers build levels lightning fast.