Skip to content

YaDisplayObjectAPI

Beta
YaDisplayObjectAPI DisplayObject API.

Functions

void YaDisplayObjectAPI.SetVisibility(YaEntity entity, boolean value)Beta
Set the visibility of YaEntity. Even if YaEntity set invisible, colliders and triggerBox will still working.
boolean YaDisplayObjectAPI.GetVisibility(YaEntity entity)Beta
Return visibility of a YaEntity. Returns False only if this entity is invisible.
void YaDisplayObjectAPI.SetColor(YaEntity entity, float3 color)Beta
Set the display Color of YaEntity. This method is valid only if color of client resources can be modified. need appearance & YGC SetColor components on the gameObject
-- Prepares the entity & set a red color.
YaDisplayObjectAPI.SetColor(entity, float3.New(1,0,0))
float3? YaDisplayObjectAPI.GetColor(YaEntity entity)Beta
Return current color of YaEntity. Return nil if Color has never been set.
void YaDisplayObjectAPI.SetOpacity(YaEntity entity, number opacity)Beta
Set the Opacity of YaEntity. This method is valid only if Opacity can be modified. need appearance & YGC SetColor components on the gameObject
-- Prepares the entity & set opacity to 0.5.
YaDisplayObjectAPI.SetOpacity(entity , 0.5)
number? YaDisplayObjectAPI.GetOpacity(YaEntity entity)Beta
Return current Opacity of YaEntity. This method is valid only if Opacity property available.
void YaDisplayObjectAPI.SetLightOnOff(YaEntity entity, boolean value)Beta
Set light turn on or not.
-- Prepares the entity & set the light off.
YaDisplayObjectAPI.SetLightOnOff(entity, false)
boolean YaDisplayObjectAPI.GetLightOnOff(YaEntity entity)Beta
Return whether light is turned on. Returns False only if SetLightOnOff as False.
void YaDisplayObjectAPI.SetLightColor(YaEntity entity, float3 color)Beta
Set Color of the light. This method is valid only if client resources withwith Light Component.
-- Prepares the entity & set the light color red.
YaDisplayObjectAPI.SetLightColor(entity, float3.New(1,0,0))
float3? YaDisplayObjectAPI.GetLightColor(YaEntity entity)Beta
Return current color of the light. Return nil if Color has never been set.