Anchoring of Empty Game Object

Lets say you have a button that is a child of the canvas. You would like to have a button always appear in the lower left corner of the canvas. To make this happen, you set the anchor setting to be ‘Bottom Left’. This works fine.

Now imagine that there is another button which you want to always appear in the upper right corner of the canvas. Only, this isn’t a single button but rather 2 buttons which are related. In other words, the two buttons have the same exact onscreen location (they are swapped out depending on the situation). Since these two buttons will always be related and if the developer wants to move the location of the button(s)… it is logical that they would be parented to an empty GO so they could be moved together.

Problem is, empty GOs don’t have anchor settings… so you can’t set the anchor settings to be ‘Top Right’.

Is there a way to make the parent empty GO anchor to the top right of the canvas?

Thanks!

In your empty object add component → layout → Rect Transform
This should give you the anchor stuff you are looking for. (it replaces Transform with RectTransform)

Alternatively, you can right click on a canvas, and THEN select to add an empty game object, and the RectTransform should be included automatically.