.. default-domain:: http .. highlight:: json Object ====== .. _http-UI.Object: .. rubric:: Object The base class of canvases, panels, controls, text, images, scroll views and toggle groups. | Derived classes: :ref:`Container `, :ref:`Control `, :ref:`Image `, :ref:`ScrollView `, :ref:`Text `, :ref:`ToggleGroup ` 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)``. .. http:get:: /ui/object/(id)/rect-transform The rect transform for the UI object. :param id: The identifier of the :ref:`Object ` object. :resjson UI.RectTransform value: .. http: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. :param id: The identifier of the :ref:`Object ` object. :resjson UI.LayoutElement value: .. http: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. :param id: The identifier of the :ref:`Object ` object. :resjson bool value: .. http: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. :param id: The identifier of the :ref:`Object ` object. :reqjson bool value: The new value. .. http:post:: /ui/object/(id)/remove Remove the UI object. :param id: The identifier of the :ref:`Object ` object.