This is the sixth day of my participation in the November Gwen Challenge. Check out the event details: The last Gwen Challenge 2021

Recommended reading

  • CSDN home page
  • GitHub open source address
  • Unity3D plugin sharing
  • Jane’s address book
  • My personal blog
  • QQ group: 1040082875

Hello everyone, I am a Buddhist engineer ☆ quiet small magic dragon ☆, update Unity development skills from time to time, think useful remember one key three link oh.

One, foreword

First, introduce a UGUI, NGUI is the predecessor of UGUI, Unity development team took NGUI development team under their own development team, and developed UGUI from this. The UGUI system has only been integrated into the Unity editor since Version 4.6.

UGUI features:

  • flexible
  • fast
  • visualization

There are many advantages for developers, such as:

  • High efficiency
  • Achieve good results
  • Easy to use and expand
  • High compatibility with the Unity editor

Panel container component introduction

A Panel container component, also known as a Panel component, is essentially a container in which other UI elements can be placed.

When a container component is moved, other UI elements in the container are also moved, making it easy to make screen adaptations, or for a group of UI elements to be adjusted uniformly.

Using the Panel container component makes the overall UI structure clearer, with containers nested within containers.

Select “Create→UI→Panel” in Unity’s Hierarchy view to Create a Panel container component:

Panel container component properties

The Panel container has only one Image component.

attribute introduce
Source Image The target image
Color color
Materila The material
Raycast Target Whether to respond to ray click
Image Type Image fill type

This component is simply a container for other UI elements.

The component’s Image can be used as the overall background for the UI elements in the container.