官术网_书友最值得收藏!

UI Panel

The main function of UI Panels is to hold other UI elements. You can create a Panel by selecting Create | UI | Panel. Its important to note that there is no Panel component. Panels are really just GameObjects that have Rect Transform, Canvas Renderer, and Image components. So, really, a UI Panel is just a UI Image with a few properties predefined for it.

By default, Panels start with the Background image (which is just a grey rounded rectangle) as the Source Image with medium opacity. You can replace the Source Image with another image or remove the image entirely.

Panels are very useful when you are trying to ensure that items scale and are appropriately relative to each other. Items that are contained within the same Panel will scale relative to the Panel and maintain their relative position to each other in the process.

We will look at the Image component more thoroughly soon, but, now that we are looking at an object that will allow us to edit its Rect Transform component, let's explore that component.

主站蜘蛛池模板: 渝北区| 旌德县| 崇左市| 临朐县| 墨脱县| 沙洋县| 都匀市| 大方县| 衡东县| 娄底市| 邵阳市| 古田县| 海淀区| 卢龙县| 武汉市| 日照市| 城步| 临洮县| 上栗县| 丰宁| 常宁市| 瓦房店市| 富源县| 罗源县| 独山县| 万荣县| 石门县| 平凉市| 潞城市| 丹凤县| 昌图县| 龙岩市| 丰顺县| 承德县| 东港市| 衡水市| 贵南县| 宜宾县| 金门县| 鄂州市| 铁力市|