Better to use the 4.6 GUI Panels or empty game objects?

Hello,
From following some of these great tutorials I learned how easy it is to put together a UI using a 4.6 GUI panel with a vertical layout group as the parent of a bunch of buttons. Normally, I wouldn’t want an image so I’d set the image script’s alpha property to zero.

Then I noticed that the panel seemed a lot like the image object so it raises these questions

  1. Is there a difference between the 4.6 GUI image and the 4.6 GUI Panel other than the starting values in the inspector? It seems the components in the inspector are identical, so does that make them the same?

  2. If I don’t want need a background image but am just using the panel to hold a veritcal layout group and child objects am I better of just using an empty game object instead of the panel?

  3. If so, does just deleting the image script from the panel essentially give me the same thing as an empty game object or should I delete and rebuild them all?

Thanks for all the great help already from both Unity and the great posts by the community!
Chris

The panel is nothing special, it’s identical to an image with the alpha set to 0.5

I typically create panels and remove the images to sort my UI. Seems easier then creating an empty GameObject and adding a RectTransform. But it’s probably the identical number of clicks.

Sitting with a bunch of images around with 0 alpha is probably throwing a fair bit on the transparent rendering queue that doesn’t need to be there. It might be optimised out, but why risk it.

1 Like

If you create an empty GameObject as a child of a Canvas it automatically gets a RectTransform. So no need to manually add it.

2 Likes

Thanks for the Info!