.. default-domain:: java .. highlight:: java .. package:: krpc.client.services.UI Object ====== .. type:: public class Object The base class of canvases, panels, controls, text, images, scroll views and toggle groups. | Derived classes: :type:`Container`, :type:`Control`, :type:`Image`, :type:`ScrollView`, :type:`Text`, :type:`ToggleGroup` .. method:: RectTransform getRectTransform() The rect transform for the UI object. .. method:: LayoutElement getLayoutElement() 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. .. method:: boolean getVisible() .. method:: void setVisible(boolean value) 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. .. method:: void remove() Remove the UI object.