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

Rect Transform component

Every UI GameObject has a Rect Transform component as its first component. This component is very similar to the Transform component on non-UI GameObject, in that it allows you to place the object within the scene.

You'll note that when you first place a Canvas in the scene, you can't adjust the values within the Rect Transform, and there is a message stating Some values driven by Canvas, as shown in the preceding screenshot.

This message means you cannot control the position of the Canvas, because of the properties selected in the Canvas component. Adjustment of Rect Transform is disabled for Canvases that are in Screen Space-Overlay Render Mode and Screen Space-Camera Render Mode (determined by the Canvas component). In these two modes, the values shown are determined by the resolution of the game display and automatically takes up the full screen. When the Canvas is in World Space Render Mode, you can adjust the values as you see fit.

We will look at the Rect Transform and the various render modes more thoroughly momentarily.

主站蜘蛛池模板: 定安县| 景东| 陇西县| 满洲里市| 西乌珠穆沁旗| 龙海市| 龙海市| 绥中县| 铁岭市| 赤城县| 克拉玛依市| 元朗区| 韶关市| 莒南县| 交口县| 罗山县| 互助| 明光市| 迁西县| 呼和浩特市| 嵩明县| 玉山县| 江孜县| 同江市| 连州市| 娄烦县| 博爱县| 新田县| 彭州市| 镇沅| 徐水县| 漳州市| 桐城市| 崇州市| 东光县| 平陆县| 承德市| 花莲市| 民乐县| 同心县| 长顺县|