Class EntityVisualsModule
Create and manages visuals for MARS Entities
Namespace: UnityEditor.MARS.Authoring
Syntax
public sealed class EntityVisualsModule : EditorScriptableSettings<EntityVisualsModule>, IModuleDependency<SlowTaskModule>
Methods
DisableVisualCollision(MARSEntity)
Disable the collider for an entity's visual. Used for preventing an entity from attaching to its own visual.
Declaration
public void DisableVisualCollision(MARSEntity entity)
Parameters
Type | Name | Description |
---|---|---|
MARSEntity | entity | The entity for which the visual should be disabled. |
GetVisual(MARSEntity)
Get the EntityVisual
associated with a MARSEntity
Declaration
public EntityVisual GetVisual(MARSEntity entity)
Parameters
Type | Name | Description |
---|---|---|
MARSEntity | entity | Entity to get the visual of |
Returns
Type | Description |
---|---|
EntityVisual | Visual associated with the given entity |
InvalidateVisual(MARSEntity)
Removes the current visual for an entity so that it will be recreated.
Declaration
public void InvalidateVisual(MARSEntity entity)
Parameters
Type | Name | Description |
---|---|---|
MARSEntity | entity | The entity for which the visual is invalid |
ResetVisualCollision()
Reset all collision with entity visuals that had previously been disabled using DisableVisualCollision
Declaration
public void ResetVisualCollision()
UpdateColor(MARSEntity)
Update the visual color for an entity
Declaration
public void UpdateColor(MARSEntity entity)
Parameters
Type | Name | Description |
---|---|---|
MARSEntity | entity | The entity that needs its visual to be updated |