YaDisplayObjectAPI¶
Beta
YaDisplayObjectAPI
DisplayObject API.Functions¶
Set the visibility of YaEntity. Even if YaEntity set invisible, colliders and triggerBox will still working.
Return visibility of a YaEntity. Returns False only if this entity is invisible.
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))
Return current color of YaEntity. Return
nil
if Color has never been set.
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)
Return current Opacity of YaEntity. This method is valid only if Opacity property available.
Set light turn on or not.
-- Prepares the entity & set the light off.
YaDisplayObjectAPI.SetLightOnOff(entity, false)
Return whether light is turned on. Returns False only if SetLightOnOff as False.
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))
Return current color of the light. Return
nil
if Color has never been set.