Object#
- class Object#
The base class of canvases, panels, controls, text, images, scroll views and toggle groups.
- rect_transform#
The rect transform for the UI object.
- Attribute:
Read-only, cannot be set
- Return type:
- layout_element#
How much space the UI object asks a layout for.
- Attribute:
Read-only, cannot be set
- Return type:
Note
Only has an effect when the object is in a panel that has a layout. A canvas is not inside a layout and does not have one.
- visible#
Whether the UI object is visible.
- Attribute:
Can be read or written
- Return type:
bool
Note
This is the object’s own setting, which is what it was last set to. An object is only drawn when everything it is inside is visible as well, so an interface can be built with its parts visible, inside a panel that is not, and shown all at once by making that panel visible.
- remove()#
Remove the UI object.