Canvas¶
- class Canvas¶
A canvas for user interface elements. See
UI.StockCanvas
andUI.AddCanvas
.- RectTransform RectTransform { get; }¶
The rect transform for the canvas.
- Game Scenes:
All
- Panel AddPanel (Boolean visible = true)¶
Create a new container for user interface elements.
- Parameters:
visible – Whether the panel is visible.
- Game Scenes:
All
- Text AddText (String content, Boolean visible = true)¶
Add text to the canvas.
- Parameters:
content – The text.
visible – Whether the text is visible.
- Game Scenes:
All
- InputField AddInputField (Boolean visible = true)¶
Add an input field to the canvas.
- Parameters:
visible – Whether the input field is visible.
- Game Scenes:
All
- Button AddButton (String content, Boolean visible = true)¶
Add a button to the canvas.
- Parameters:
content – The label for the button.
visible – Whether the button is visible.
- Game Scenes:
All
- void Remove ()¶
Remove the UI object.
- Game Scenes:
All