docs.unity3d.com
    Show / Hide Table of Contents

    Class QuerySimulationModule

    Module responsible for simulating queries in edit mode

    Inheritance
    Object
    ScriptableSettingsBase
    ScriptableSettingsBase<QuerySimulationModule>
    EditorScriptableSettings<QuerySimulationModule>
    QuerySimulationModule
    Inherited Members
    EditorScriptableSettings<QuerySimulationModule>.instance
    ScriptableSettingsBase<QuerySimulationModule>.k_HasCustomPath
    ScriptableSettingsBase<QuerySimulationModule>.s_Instance
    ScriptableSettingsBase<QuerySimulationModule>.Save(String)
    ScriptableSettingsBase<QuerySimulationModule>.GetFilePath()
    ScriptableSettingsBase.k_PathExceptionMessage
    ScriptableSettingsBase.GetInstanceByType(Type)
    ScriptableSettingsBase.OnLoaded()
    Namespace: UnityEditor.MARS.Simulation
    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
    Type Description
    GameObject

    sceneIsSimulatable

    Whether the active scene can be simulated

    Declaration
    public static bool sceneIsSimulatable { get; }
    Property Value
    Type Description
    Boolean

    simulatedDataAvailable

    Declaration
    [Obsolete("simulatedDataAvailable has been deprecated", true)]
    public bool simulatedDataAvailable { get; }
    Property Value
    Type Description
    Boolean

    simulating

    Whether a simulation is currently running

    Declaration
    public bool simulating { get; }
    Property Value
    Type Description
    Boolean

    simulatingTemporal

    Whether a temporal simulation is currently running

    Declaration
    public bool simulatingTemporal { get; }
    Property Value
    Type Description
    Boolean

    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
    Type Name Description
    SimulationModeSelection simModeSelection

    The requested mode selection method

    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
    Type Description
    Action<List<IFunctionalityProvider>>

    BeforeCleanupProviders

    Called right before simulation providers are destroyed

    Declaration
    public static event Action BeforeCleanupProviders
    Event Type
    Type Description
    Action

    BeforeSimulationSetup

    Called right before a simulation starts setting up

    Declaration
    public static event Action BeforeSimulationSetup
    Event Type
    Type Description
    Action

    BeforeTemporalSimulationRestart

    Called right before a temporal simulation ends and a new one starts

    Declaration
    public static event Action BeforeTemporalSimulationRestart
    Event Type
    Type Description
    Action

    OnOneShotSimulationStart

    Called right after a single-frame simulation has started

    Declaration
    public static event Action OnOneShotSimulationStart
    Event Type
    Type Description
    Action

    onTemporalSimulationStart

    Called right after a temporal simulation has started

    Declaration
    public static event Action onTemporalSimulationStart
    Event Type
    Type Description
    Action

    onTemporalSimulationStop

    Called right after a temporal simulation has stopped

    Declaration
    public static event Action onTemporalSimulationStop
    Event Type
    Type Description
    Action

    simulationDone

    Called right after a single-frame simulation has stopped

    Declaration
    public static event Action simulationDone
    Event Type
    Type Description
    Action

    Explicit Interface Implementations

    IFunctionalitySubscriber<IProvidesCameraOffset>.provider

    Declaration
    IProvidesCameraOffset IFunctionalitySubscriber<IProvidesCameraOffset>.provider { get; set; }
    Returns
    Type Description
    IProvidesCameraOffset
    Implements
    IFunctionalitySubscriber<TProvider>.provider

    IModule.LoadModule()

    Declaration
    void IModule.LoadModule()
    Implements
    IModule.LoadModule()

    IModule.UnloadModule()

    Declaration
    void IModule.UnloadModule()
    Implements
    IModule.UnloadModule()

    IModuleDependency<MARSDatabase>.ConnectDependency(MARSDatabase)

    Declaration
    void IModuleDependency<MARSDatabase>.ConnectDependency(MARSDatabase dependency)
    Parameters
    Type Name Description
    MARSDatabase dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)

    IModuleDependency<ReasoningModule>.ConnectDependency(ReasoningModule)

    Declaration
    void IModuleDependency<ReasoningModule>.ConnectDependency(ReasoningModule dependency)
    Parameters
    Type Name Description
    ReasoningModule dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)

    IModuleDependency<SlowTaskModule>.ConnectDependency(SlowTaskModule)

    Declaration
    void IModuleDependency<SlowTaskModule>.ConnectDependency(SlowTaskModule dependency)
    Parameters
    Type Name Description
    SlowTaskModule dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)

    IModuleDependency<EvaluationSchedulerModule>.ConnectDependency(EvaluationSchedulerModule)

    Declaration
    void IModuleDependency<EvaluationSchedulerModule>.ConnectDependency(EvaluationSchedulerModule dependency)
    Parameters
    Type Name Description
    EvaluationSchedulerModule dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)

    IModuleDependency<MARSQueryBackend>.ConnectDependency(MARSQueryBackend)

    Declaration
    void IModuleDependency<MARSQueryBackend>.ConnectDependency(MARSQueryBackend dependency)
    Parameters
    Type Name Description
    MARSQueryBackend dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)

    IModuleDependency<QueryPipelinesModule>.ConnectDependency(QueryPipelinesModule)

    Declaration
    void IModuleDependency<QueryPipelinesModule>.ConnectDependency(QueryPipelinesModule dependency)
    Parameters
    Type Name Description
    QueryPipelinesModule dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)

    IModuleDependency<FunctionalityInjectionModule>.ConnectDependency(FunctionalityInjectionModule)

    Declaration
    void IModuleDependency<FunctionalityInjectionModule>.ConnectDependency(FunctionalityInjectionModule dependency)
    Parameters
    Type Name Description
    FunctionalityInjectionModule dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)

    IModuleDependency<SceneWatchdogModule>.ConnectDependency(SceneWatchdogModule)

    Declaration
    void IModuleDependency<SceneWatchdogModule>.ConnectDependency(SceneWatchdogModule dependency)
    Parameters
    Type Name Description
    SceneWatchdogModule dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)

    IModuleDependency<MARSEnvironmentManager>.ConnectDependency(MARSEnvironmentManager)

    Declaration
    void IModuleDependency<MARSEnvironmentManager>.ConnectDependency(MARSEnvironmentManager dependency)
    Parameters
    Type Name Description
    MARSEnvironmentManager dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)

    IModuleDependency<SimulatedObjectsManager>.ConnectDependency(SimulatedObjectsManager)

    Declaration
    void IModuleDependency<SimulatedObjectsManager>.ConnectDependency(SimulatedObjectsManager dependency)
    Parameters
    Type Name Description
    SimulatedObjectsManager dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)

    IModuleDependency<SimulationSceneModule>.ConnectDependency(SimulationSceneModule)

    Declaration
    void IModuleDependency<SimulationSceneModule>.ConnectDependency(SimulationSceneModule dependency)
    Parameters
    Type Name Description
    SimulationSceneModule dependency
    Implements
    IModuleDependency<T>.ConnectDependency(T)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023