Skip to content

YaUIManager

YaUIManager configures the UI manager.

Properties

float2 ScreenSize

CLIENT ONLY 
Returns the screen size.

Functions

YaUIObject CreateUIPanel(string path, string packageName, string comName, [boolean fullScreen])

CLIENT ONLY 
Creates a UI canvas.

void RemovePackage(string packageName)

CLIENT ONLY 
Removes a UI package by name.

string GetUrl(YaUIObject Obj)

CLIENT ONLY 
Returns a UI object's URL.
  • Obj UI object

YaUIObject CreateUIElement(YaUIType type)

CLIENT ONLY 
Create a new ui element
  • type YaUIType

boolean IsTouchOnUI()

CLIENT ONLY 
Whether to click on the ui

void DisplayLeftJoyStick(boolean value)

CLIENT ONLY 
Shows or hides the left joystick.

void DisplayAttackButton(boolean value)

CLIENT ONLY 
Shows or hides the attack button.

void DisplayJumpButton(boolean value)

CLIENT ONLY 
Shows or hides the jump button.

void DisplayBuiltInSingleBoardUI(boolean value)

CLIENT ONLY 
show/hide built-in SingleBoard ui
  • value If true, use BuiltIn; if false, use YGC

void PutModelUI(string key, boolean value)

CLIENT ONLY 
Determines whether to turn off the character controls on entering UI.
  • key Custom value
  • value If true, the character control is turned off; if false, it's on.

YaUIComponent SpawnRankPanel3D(float3 pos, float3 rotation, float3 scale)

CLIENT ONLY 
Creates a 3D leaderboard.
  • pos The position of the leaderboard
  • rotation The rotation of the leaderboard
  • scale The scale of the leaderboard

YaUIComponent Create3DUI(string packageName, string canvasName, float3 pos, float3 rotation, float3 scale)

CLIENT ONLY 
Creates a 3D UI.
  • packageName package Name
  • canvasName canvas Name
  • pos The position of the ui
  • rotation The rotation of the ui
  • scale The scale of the ui (float3.New(0.0032,0.0032,0.0032))

float2 WorldPointToUIPoint(float3 worldPoint)

CLIENT ONLY 
Returnsui position
Get ui position from world position

float3 UIPointToWorldPoint(float2 uiPoint)

CLIENT ONLY 
Returnsworld position
Get world position from ui position
  • uiPoint ui position

float2 ScreenPointToUIPoint(float2 screenPoint)

CLIENT ONLY 
Transforms a point from the screen coordinate system to ui coordinates.

float2 UIPointToScreenPoint(float2 uiPoint)

CLIENT ONLY 
Transforms a point from the ui coordinate to screen coordinates system.