Panel

public class Panel

A container for user interface elements. See Canvas.addPanel(boolean).

RectTransform getRectTransform()

The rect transform for the panel.

boolean getVisible()
void setVisible(boolean value)

Whether the UI object is visible.

Panel addPanel(boolean visible)

Create a panel within this panel.

Parameters:
  • visible (boolean) – Whether the new panel is visible.

Text addText(String content, boolean visible)

Add text to the panel.

Parameters:
  • content (String) – The text.

  • visible (boolean) – Whether the text is visible.

InputField addInputField(boolean visible)

Add an input field to the panel.

Parameters:
  • visible (boolean) – Whether the input field is visible.

Button addButton(String content, boolean visible)

Add a button to the panel.

Parameters:
  • content (String) – The label for the button.

  • visible (boolean) – Whether the button is visible.

void remove()

Remove the UI object.