Class QuerySimulationModule
Module responsible for simulating queries in edit mode
Inheritance
QuerySimulationModule
Syntax
[MovedFrom("Unity.MARS")]
public class QuerySimulationModule : EditorScriptableSettings<QuerySimulationModule>, IModuleDependency<MARSDatabase>, IModuleDependency<MARSQueryBackend>, IModuleDependency<ReasoningModule>, IModuleDependency<SlowTaskModule>, IModuleDependency<SimulatedObjectsManager>, IModuleDependency<MARSEnvironmentManager>, IModuleDependency<EvaluationSchedulerModule>, IModuleDependency<FunctionalityInjectionModule>, IModuleDependency<SimulationSceneModule>, IModuleDependency<SceneWatchdogModule>, IModuleDependency<QueryPipelinesModule>, IModule, IUsesDatabaseQuerying, IUsesCameraOffset, IFunctionalitySubscriber<IProvidesCameraOffset>, IFunctionalitySubscriber
Properties
providersRoot
Root game object for functionality providers created for simulation
Declaration
public GameObject providersRoot { get; }
Property Value
sceneIsSimulatable
Whether the active scene can be simulated
Declaration
public static bool sceneIsSimulatable { get; }
Property Value
simulatedDataAvailable
Declaration
[Obsolete("simulatedDataAvailable has been deprecated", true)]
public bool simulatedDataAvailable { get; }
Property Value
simulating
Whether a simulation is currently running
Declaration
public bool simulating { get; }
Property Value
simulatingTemporal
Whether a temporal simulation is currently running
Declaration
public bool simulatingTemporal { get; }
Property Value
Methods
RequestSimulationModeSelection(SimulationModeSelection)
Request that the next simulation should run in either single-frame mode or temporal mode
Declaration
public void RequestSimulationModeSelection(SimulationModeSelection simModeSelection)
Parameters
RestartSimulationIfNeeded(Boolean)
If any objects are using the simulation scene, this method sets a flag that a new simulation should happen as soon as possible
Declaration
public void RestartSimulationIfNeeded(bool stopSimulationImmediately = false)
Parameters
Type |
Name |
Description |
Boolean |
stopSimulationImmediately |
If true and if temporal simulation is running, this method will
immediately stop simulation. If TemporalMode has been requested for the
next simulation then this method will invoke BeforeTemporalSimulationRestart before stopping simulation.
|
SimulateOneShot()
Runs simulation over a single frame.
This method repeatedly checks for query matches until there are no more to be found.
Declaration
public void SimulateOneShot()
StartTemporalSimulation()
Starts query simulation that runs frame-to-frame
Declaration
public void StartTemporalSimulation()
StopTemporalSimulation()
Declaration
[Obsolete("StopTemporalSimulation() has been deprecated because it does not fully reset the state of simulation. To stop temporal simulation and reset state, use RestartSimulationIfNeeded().", false)]
public void StopTemporalSimulation()
Events
addCustomProviders
Called right before default providers are setup when starting simulation.
The list should be filled out with providers that you want this module to add before it sets up default providers.
Provider game objects created in this callback should be created using GameObjectUtils.Create so that they get
added to the simulation scene.
Declaration
public static event Action<List<IFunctionalityProvider>> addCustomProviders
Event Type
BeforeCleanupProviders
Called right before simulation providers are destroyed
Declaration
public static event Action BeforeCleanupProviders
Event Type
BeforeSimulationSetup
Called right before a simulation starts setting up
Declaration
public static event Action BeforeSimulationSetup
Event Type
BeforeTemporalSimulationRestart
Called right before a temporal simulation ends and a new one starts
Declaration
public static event Action BeforeTemporalSimulationRestart
Event Type
OnOneShotSimulationStart
Called right after a single-frame simulation has started
Declaration
public static event Action OnOneShotSimulationStart
Event Type
onTemporalSimulationStart
Called right after a temporal simulation has started
Declaration
public static event Action onTemporalSimulationStart
Event Type
onTemporalSimulationStop
Called right after a temporal simulation has stopped
Declaration
public static event Action onTemporalSimulationStop
Event Type
simulationDone
Called right after a single-frame simulation has stopped
Declaration
public static event Action simulationDone
Event Type
Explicit Interface Implementations
Declaration
IProvidesCameraOffset IFunctionalitySubscriber<IProvidesCameraOffset>.provider { get; set; }
Returns
Implements
Declaration
void IModule.LoadModule()
Implements
Declaration
void IModule.UnloadModule()
Implements
Declaration
void IModuleDependency<MARSDatabase>.ConnectDependency(MARSDatabase dependency)
Parameters
Implements
Declaration
void IModuleDependency<ReasoningModule>.ConnectDependency(ReasoningModule dependency)
Parameters
Implements
Declaration
void IModuleDependency<SlowTaskModule>.ConnectDependency(SlowTaskModule dependency)
Parameters
Implements
Declaration
void IModuleDependency<EvaluationSchedulerModule>.ConnectDependency(EvaluationSchedulerModule dependency)
Parameters
Implements
Declaration
void IModuleDependency<MARSQueryBackend>.ConnectDependency(MARSQueryBackend dependency)
Parameters
Implements
Declaration
void IModuleDependency<QueryPipelinesModule>.ConnectDependency(QueryPipelinesModule dependency)
Parameters
Implements
Declaration
void IModuleDependency<FunctionalityInjectionModule>.ConnectDependency(FunctionalityInjectionModule dependency)
Parameters
Implements
Declaration
void IModuleDependency<SceneWatchdogModule>.ConnectDependency(SceneWatchdogModule dependency)
Parameters
Implements
Declaration
void IModuleDependency<MARSEnvironmentManager>.ConnectDependency(MARSEnvironmentManager dependency)
Parameters
Implements
Declaration
void IModuleDependency<SimulatedObjectsManager>.ConnectDependency(SimulatedObjectsManager dependency)
Parameters
Implements
Declaration
void IModuleDependency<SimulationSceneModule>.ConnectDependency(SimulationSceneModule dependency)
Parameters
Implements