UI Image vs UI Panel

My question is, what is the difference between the UI Image and the UI Panel?

In my Number Wizard UI game, I did my design of the UI elements before I looked at Rick’s solution and I used panels rather than images for the background elements. Should I be using images instead? Are images more efficient or take less memory…?

I tried to find documentation on the UI Panel in the Unity docs and oddly couldn’t find it anywhere. I found image in the UI Reference

https://docs.unity3d.com/Manual/script-Image.html

but I can’t find Panel anywhere in the User interfaces (UI) section of the docs…??

Hi Charles,

Which version of Unity do you use?

Create a panel in Unity. Then check the Hierarchy and the Inspector of the Panel and its children (if there are any). It might well be that “Panel” is just a shortcut creating a game object with an Image and a predefined Source Image.

If there is a Panel component, please share a screenshot.

I’m using Unity 2019.2.12f1

Here’s a screenshot of the UI Panel gameobject. It’s right under Canvas.

Create a Panel. Then check the game object(s) in your Hierarchy. Is there a Panel component attached to an Inspector? If not, it’s nothing but a shortcut.

So a Panel seems to be an Image with the Source Image already set (set to something called Background), and the Image Type set to Sliced.

I wonder why it’s included in the Unity Editor but not in the documentation. And no discussion in the documentation regarding its purpose.

Panel

Image

At least when you are developing your own game, you’ll learn that the Unity documentation is surprisingly limited. For example, a student recently noticed that the Text class cannot be found in the API for Unity 2019.2 anymore.

Interesting. That’s good to know. Thanks for your insight into all this.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms