Class SimulationSceneUsers
Used to track the objects using the Simulation Scene across Assembly and Module loading. This is used since the Simulation Scene Module can be reloaded outside of normal times when object would try and start or stop using the Simulation Scene.
Namespace: Unity.MARS
Syntax
[Serializable]
public class SimulationSceneUsers : ScriptableObject
Properties
instance
Declaration
public static SimulationSceneUsers instance { get; }
Property Value
Type | Description |
---|---|
SimulationSceneUsers |
simulationSceneUserCount
The current number of objects using the Simulation Scene.
Declaration
public int simulationSceneUserCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
AddSimulationUser(ScriptableObject)
Add the object as a using the Simulation Scene
Declaration
public void AddSimulationUser(ScriptableObject usingModule)
Parameters
Type | Name | Description |
---|---|---|
ScriptableObject | usingModule | The object using the sim Scene |
ContainsSimulationUser(ScriptableObject)
Checks if the object is using the Simulation Scene
Declaration
public bool ContainsSimulationUser(ScriptableObject usingModule)
Parameters
Type | Name | Description |
---|---|---|
ScriptableObject | usingModule | The object to check if using |
Returns
Type | Description |
---|---|
Boolean |
CreateSimulationSceneSubscribers()
Declaration
public static SimulationSceneUsers CreateSimulationSceneSubscribers()
Returns
Type | Description |
---|---|
SimulationSceneUsers |
RemoveSimulationUser(ScriptableObject)
Removes the object from using the Simulation Scene
Declaration
public void RemoveSimulationUser(ScriptableObject usingModule)
Parameters
Type | Name | Description |
---|---|---|
ScriptableObject | usingModule | The object no longer using the sim Scene |