YaDisplayObjectAPI
YaDisplayObjectAPI manages the display of entities.Functions
void YaDisplayObjectAPI.SetVisibilityIncludeAllChildren(YaEntity entity, boolean value)
Determines whether an entity is visible or invisible. Even if an entity is set invisible, its colliders and triggerBox will continue to work,include all children.
entityEntityvalueFalse if entity invisible
void YaDisplayObjectAPI.SetVisibilityNotIncludeChildren(YaEntity entity, boolean value)
Determines whether an entity is visible or invisible. Even if an entity is set invisible, its colliders and triggerBox will continue to work,exclude all children.
entityEntityvalueFalse if entity invisible
boolean YaDisplayObjectAPI.GetVisibility(YaEntity entity)
entityEntity
void YaDisplayObjectAPI.SetColor(YaEntity entity, float3 color)
Sets the display color of an entity. Only applicable when the entity has the Appearance property.
entityentitycolorcolor
-- Prepares the entity & set a red color.
YaDisplayObjectAPI.SetColor(entity, float3.New(1,0,0))
float3? YaDisplayObjectAPI.GetColor(YaEntity entity)
nil if its color has never been set.entityentity
void YaDisplayObjectAPI.SetOpacity(YaEntity entity, number opacity)
Sets the opacity of the entity. Only applicable when the entity contains both the Appearance and Opacity properties.
entityentityopacityopacity
-- Prepares the entity & set opacity to 0.5.
YaDisplayObjectAPI.SetOpacity(entity , 0.5)
number? YaDisplayObjectAPI.GetOpacity(YaEntity entity)
nil if the opacity has never been set.entityEntity
void YaDisplayObjectAPI.SetLightOnOff(YaEntity entity, boolean value)
Determines whether the light is on or off.
entityEntityvalueValue
-- Prepares the entity & set the light off.
YaDisplayObjectAPI.SetLightOnOff(entity, false)
boolean YaDisplayObjectAPI.GetLightOnOff(YaEntity entity)
entityEntity
void YaDisplayObjectAPI.SetLightColor(YaEntity entity, float3 color)
Set the color of the light.
entityEntitycolorColor (float3)
-- Prepares the entity & set the light color red.
YaDisplayObjectAPI.SetLightColor(entity, float3.New(1,0,0))
float3? YaDisplayObjectAPI.GetLightColor(YaEntity entity)
nil if the light color has never been set.entityEntity