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.
entity
Entityvalue
False 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.
entity
Entityvalue
False if entity invisible
boolean YaDisplayObjectAPI.GetVisibility(YaEntity entity)¶
ReturnsVisible
Returns true if the entity is visible, or false if it's invisible.
entity
Entity
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.
entity
entitycolor
color
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.
entity
entity
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.
entity
entityopacity
opacity
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.
entity
Entity
void YaDisplayObjectAPI.SetLightOnOff(YaEntity entity, boolean value)¶
Determines whether the light is on or off.
entity
Entityvalue
Value
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.
entity
Entity
void YaDisplayObjectAPI.SetLightColor(YaEntity entity, float3 color)¶
SERVER ONLY
Set the color of the light.
entity
Entitycolor
Color (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.
entity
Entity