Panel#

class Panel#

A container for user interface elements. See Canvas.AddPanel.

RectTransform RectTransform { get; }#

The rect transform for the panel.

Game Scenes:

All

Boolean Visible { get; set; }#

Whether the UI object is visible.

Game Scenes:

All

Panel AddPanel (Boolean visible = true)#

Create a panel within this panel.

Parameters:
  • visible – Whether the new panel is visible.

Game Scenes:

All

Text AddText (String content, Boolean visible = true)#

Add text to the panel.

Parameters:
  • content – The text.

  • visible – Whether the text is visible.

Game Scenes:

All

InputField AddInputField (Boolean visible = true)#

Add an input field to the panel.

Parameters:
  • visible – Whether the input field is visible.

Game Scenes:

All

Button AddButton (String content, Boolean visible = true)#

Add a button to the panel.

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