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)¶
ReturnsVisible
Returns true if the entity is visible, or false if it's invisible.
entityEntity
void YaDisplayObjectAPI.SetColor(YaEntity entity, float3 color)¶
SERVER ONLY
Sets the display color of an entity. Only applicable when the entity has the Appearance property.
entityentitycolorcolor
1 2 | |
float3? YaDisplayObjectAPI.GetColor(YaEntity entity)¶
SERVER ONLY
Returnscolor (float3)
Returns the current color of the entity. Returns nil if its color has never been set.
entityentity
void YaDisplayObjectAPI.SetOpacity(YaEntity entity, number opacity)¶
SERVER ONLY
Sets the opacity of the entity. Only applicable when the entity contains both the Appearance and Opacity properties.
entityentityopacityopacity
1 2 | |
number? YaDisplayObjectAPI.GetOpacity(YaEntity entity)¶
SERVER ONLY
ReturnsCurrent opacity of the entity or nil
Returns the current opacity of the entity, or 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
1 2 | |
boolean YaDisplayObjectAPI.GetLightOnOff(YaEntity entity)¶
ReturnsTrue if the light is on
Returns true if the light is on, or false if the light is off.
entityEntity
void YaDisplayObjectAPI.SetLightColor(YaEntity entity, float3 color)¶
SERVER ONLY
Set the color of the light.
entityEntitycolorColor (float3)
1 2 | |
float3? YaDisplayObjectAPI.GetLightColor(YaEntity entity)¶
SERVER ONLY
ReturnsColor (float3)
Returns the current color of the light. Returns nil if the light color has never been set.
entityEntity