Class SimulatedObjectsManager
Module responsible for copying simulatable objects to the simulation scene, mapping between these copies and their originals,
and checking for changes to the original objects
Inheritance
SimulatedObjectsManager
Syntax
public class SimulatedObjectsManager : EditorScriptableSettings<SimulatedObjectsManager>, IModuleDependency<QuerySimulationModule>, IModuleDependency<MARSEnvironmentManager>, IModuleDependency<SimulationSceneModule>, IModuleDependency<SceneWatchdogModule>, IModule
Fields
SimulatedObjectHideFlags
Declaration
public const HideFlags SimulatedObjectHideFlags = null
Field Value
Type |
Description |
HideFlags |
|
Properties
SimulatableBehavioursBlockingResyncCount
Number of behaviours that are currently blocking auto resync
Declaration
public int SimulatableBehavioursBlockingResyncCount { get; }
Property Value
SimulatedCamera
Declaration
public Camera SimulatedCamera { get; }
Property Value
SimulatedContentRoot
Declaration
public GameObject SimulatedContentRoot { get; }
Property Value
Type |
Description |
GameObject |
|
SimulationSyncedWithScene
Declaration
public bool SimulationSyncedWithScene { get; }
Property Value
Methods
AddSpawnedObjectToSimulation(GameObject)
Adds the given Game Object to the current simulation and starts running its ISimulatable behaviours
Declaration
public void AddSpawnedObjectToSimulation(GameObject gameObject)
Parameters
Type |
Name |
Description |
GameObject |
gameObject |
The Game Object to add to simulation
|
ConnectDependency(MARSEnvironmentManager)
Declaration
public void ConnectDependency(MARSEnvironmentManager dependency)
Parameters
Implements
ConnectDependency(QuerySimulationModule)
Declaration
public void ConnectDependency(QuerySimulationModule dependency)
Parameters
Implements
ConnectDependency(SceneWatchdogModule)
Declaration
public void ConnectDependency(SceneWatchdogModule dependency)
Parameters
Implements
ConnectDependency(SimulationSceneModule)
Declaration
public void ConnectDependency(SimulationSceneModule dependency)
Parameters
Implements
DirtySimulatableScene()
Sets flags that the active scene has been modified and simulation should restart.
This guarantees that the scene contents will be copied to the simulation scene for the next simulation.
Declaration
public void DirtySimulatableScene()
GetCopiedSimulatable(ISimulatable)
Returns the simulation scene copy of an ISimulatable, if there is one
Declaration
public ISimulatable GetCopiedSimulatable(ISimulatable original)
Parameters
Type |
Name |
Description |
ISimulatable |
original |
The original version of a copied ISimulatable
|
Returns
Returns the simulation scene copy of a Transform, if there is one
Declaration
public Transform GetCopiedTransform(Transform original)
Parameters
Type |
Name |
Description |
Transform |
original |
The original version of a copied Transform
|
Returns
Type |
Description |
Transform |
|
GetOriginalObject(Object)
Returns the original scene copy of a simulation scene Object, if there is one being managed
Declaration
public Object GetOriginalObject(Object copy)
Parameters
Type |
Name |
Description |
Object |
copy |
The copied version of an object
|
Returns
GetOriginalSimulatable(ISimulatable)
Returns the original version of an ISimulatable copied to the simulation scene, if there is one
Declaration
public ISimulatable GetOriginalSimulatable(ISimulatable copy)
Parameters
Type |
Name |
Description |
ISimulatable |
copy |
The ISimulatable in the simulation scene
|
Returns
Returns the original scene copy of a simulation scene Transform, if there is one
Declaration
public Transform GetOriginalTransform(Transform copy)
Parameters
Type |
Name |
Description |
Transform |
copy |
The copied version of a Transform
|
Returns
Type |
Description |
Transform |
|
IsSimulatedObject(GameObject)
Checks whether an object is a simulated object.
Declaration
public static bool IsSimulatedObject(GameObject obj)
Parameters
Type |
Name |
Description |
GameObject |
obj |
The gameobject to check.
|
Returns
LoadModule()
Declaration
Implements
UnloadModule()
Declaration
public void UnloadModule()
Implements