Class SceneWatchdogModule
Polls the scene for changes to a MARS scene and provides callbacks when those changes happen
Namespace: UnityEditor.MARS
Syntax
public class SceneWatchdogModule : EditorScriptableSettings<SceneWatchdogModule>, IModuleDependency<SimulatedObjectsManager>
Properties
anyEntitiesInScene
Whether there are any MARSEntities in the active scene
Declaration
public bool anyEntitiesInScene { get; }
Property Value
Type | Description |
---|---|
Boolean |
anySubscribersInScene
Whether there are any IFunctionalitySubscribers in the active scene
Declaration
public bool anySubscribersInScene { get; }
Property Value
Type | Description |
---|---|
Boolean |
currentSceneIsFaceScene
Whether the active scene requires the "face" trait or has face tracking subscribers
Declaration
public bool currentSceneIsFaceScene { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Update()
Update the module. When loaded called on EditorApplication.update
Declaration
public void Update()
Events
entitiesAdded
Called when MARSEntities are added to the active scene. Use this for a coarse-grained change check. Provided list contains only entities which have been added
Declaration
public event Action<List<MARSEntity>> entitiesAdded
Event Type
Type | Description |
---|---|
Action<List<MARSEntity>> |
entitiesRemoved
Called when MARSEntities are removed from the active scene These have been destroyed and should only be used for the hash code or equality checks, like Dictionary removal Use this for a coarse-grained change check. Provided list contains only entities which have been destroyed
Declaration
public event Action<List<MARSEntity>> entitiesRemoved
Event Type
Type | Description |
---|---|
Action<List<MARSEntity>> |
entityComponentsAdded
Called when MARSEntities or components on a MARSEntity or its children are added to the active scene. Use this for a fine-grained change check. Provided list contains all entities and child components which have been added
Declaration
public event Action<List<Component>> entityComponentsAdded
Event Type
Type | Description |
---|---|
Action<List<Component>> |
entityComponentsRemoved
Called when MARSEntities or their child components are removed from the active scene. These have been destroyed and should only be used for the hash code or equality checks, like Dictionary removal Use this for a fine-grained change check. Provided list contains all entities and child components which have been destroyed
Declaration
public event Action<List<Component>> entityComponentsRemoved
Event Type
Type | Description |
---|---|
Action<List<Component>> |
faceSceneStateChanged
Called when the state of whether the active scene uses face tracking has changed
Declaration
public event Action<bool> faceSceneStateChanged
Event Type
Type | Description |
---|---|
Action<Boolean> |
functionalitySubscribersAdded
Called when IFunctionalitySubscribers are added to the active scene. Provided list contains subscribers which have been added.
Declaration
public event Action<List<IFunctionalitySubscriber>> functionalitySubscribersAdded
Event Type
Type | Description |
---|---|
Action<List<IFunctionalitySubscriber>> |
functionalitySubscribersRemoved
Called when IFunctionalitySubscribers are removed from the active scene. These have been destroyed and should only be used for the hash code or equality checks, like Dictionary removal. Provided list contains subscribers which have been removed.
Declaration
public event Action<List<IFunctionalitySubscriber>> functionalitySubscribersRemoved
Event Type
Type | Description |
---|---|
Action<List<IFunctionalitySubscriber>> |
prefabInstanceReverted
Called when a prefab is reverted outside of a prefab stage.
Declaration
public event Action prefabInstanceReverted
Event Type
Type | Description |
---|---|
Action |