- Mastering UI Development with Unity
- Ashley Godbold
- 178字
- 2021-08-27 18:43:11
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.
- Scratch真好玩:教小孩學編程
- 正則表達式經典實例(第2版)
- Python機器學習經典實例
- Java EE 8 Application Development
- Flutter跨平臺開發入門與實戰
- Julia高性能科學計算(第2版)
- RealSenseTM互動開發實戰
- C++編程兵書
- SQL Server 2016 從入門到實戰(視頻教學版)
- C# 7.1 and .NET Core 2.0:Modern Cross-Platform Development(Third Edition)
- 軟件測試技術
- Koa與Node.js開發實戰
- 虛擬現實:引領未來的人機交互革命
- Python程序員面試算法寶典
- BackTrack 5 Cookbook