Object#

Object

The base class of canvases, panels, controls, text, images, scroll views and toggle groups.

A Object object is returned as {"id": ..., "class": ...}, its identifier and the name of its own class. An argument is that object or the identifier alone. A path that acts on an object takes the identifier as (id).

GET /ui/object/(id)/rect-transform#

The rect transform for the UI object.

Parameters:
  • id – The identifier of the Object object.

Response JSON Object:
  • value (UI.RectTransform)

GET /ui/object/(id)/layout-element#

How much space the UI object asks a layout for.

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.

Parameters:
  • id – The identifier of the Object object.

Response JSON Object:
  • value (UI.LayoutElement)

GET /ui/object/(id)/visible#

Whether the UI object is visible.

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.

Parameters:
  • id – The identifier of the Object object.

Response JSON Object:
  • value (bool)

PUT /ui/object/(id)/visible#

Whether the UI object is visible.

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.

Parameters:
  • id – The identifier of the Object object.

Request JSON Object:
  • value (bool) – The new value.

POST /ui/object/(id)/remove#

Remove the UI object.

Parameters:
  • id – The identifier of the Object object.