YaUIComponent
YaUIComponent adjusts the canvas in the UI.Properties
boolean Opaque
number ViewWidth
number ViewHeight
Functions
float2 GlobalToLocal(float2 position)
Converts world position of the canvas to local position.
- positionWorld position of the canvas
void AddChild(YaUIObject yaUIObject)
Add the ui to the canvas
void RemoveChild(YaUIObject yaUIObject)
Remove the ui to the canvas
YaUIComponent GetComponent(string name)
Gets a canvas inside the current canvas by name.
- nameName of the canvas
YaUIButton GetButton(string name)
Gets a button on the current canvas by name.
- nameName of the button
YaUIImage GetImage(string name)
Gets an image on the current canvas by name.
- nameName of the image
void SetYaUIComponentToRoot(number sortingOrder)
Moves the current canvas to the root node in UI.
- sortingOrderDisplays a canvas in numeric order(0~29999)
YaUIGraph GetGraph(string name)
Gets a graph on the current canvas by name.
- nameName of the graph
YaUIList GetList(string name)
Gets a list on the current canvas by name.
- nameName of the list
YaUIObject GetChildByIndex(number index)
Gets a child controller on the current canvas by index.
- indexIndex of a child controller
YaUIText GetTextField(string name)
Gets a text field on the canvas by name.
- nameName of the text field
YaUITextInput GetTextInput(string name)
Gets a text input field on the current canvas by name.
- nameName of the text input field
YaUILoader GetLoader(string name)
Gets a loader on the current canvas by name.
- nameName of the loader
YaUIVideoPlayer GetVideoPlayer(string name)
Gets a video player on the current canvas by name.
- nameName of the video player
YaUISlider GetSlider(string name)
Gets a slider bar on the current canvas by name.
- nameName of the slider bar
YaUIProgressBar GetProgressBar(string name)
Gets a progress bar on the current canvas by name.
- nameName of the progress bar
Controller GetController(string name)
Gets a controller on the current canvas by name. This function is only recommended for advanced users.
- nameName of the controller
Transition GetTransition(string name)
Gets an animation component on the current canvas by name. This function is only recommended for advanced users.
- nameName of the animation
void DoDispose()
Disposes of the current canvas.