|SetAway:[[Type:Action|Action]]|[[Type:Action|Action]]|false|Stores the renderer's material list in <code>_oldMaterials</code> and replaces them with the <code>AwayMaterial</code>.
|Restore()|[[Type:Action|Action]]|
|Restore:[[Type:Action|Action]]|[[Type:Action|Action]]|false|Restores the renderer's materials from <code>_oldMaterials</code>.
|OnTestAway:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| Stores the renderer's material list in <code>_oldMaterials</code> and replaces them with the <code>AwayMaterial</code>.
|OnTestRestore:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| Restores the renderer's materials from <code>_oldMaterials</code>.
}}
}}
{{Table ComponentMethods
|SetAway()||Stores the renderer's material list in <code>_oldMaterials</code> and replaces them with the <code>AwayMaterial</code>.
|Restore()||Restores the renderer's materials from <code>_oldMaterials</code>.
}}
<!--T:4-->
<!--T:4-->
== Usage ==
== Usage ==
Line 36:
Line 34:
<!--T:5-->
<!--T:5-->
== Examples ==
== Examples ==
Used on avatar meshes so they show an away Material when the user is away.
SimpleAwayIndicator component as seen in the Scene Inspector
The SimpleAwayIndicator indicates when a user doesn't have the session focused by temporarily replacing the materials of a MeshRenderer with the specified Away Material.