docs.unity3d.com
    Show / Hide Table of Contents

    Class SimulationSceneModule

    Maintains a preview scene that the MARS Environment Manager uses to hold the environment objects and simulation query objects.

    Inheritance
    Object
    SimulationSceneModule
    Namespace: UnityEditor.MARS.Simulation
    Syntax
    [MovedFrom("Unity.MARS")]
    public class SimulationSceneModule : IModuleDependency<MARSSceneModule>, IModuleBehaviorCallbacks, IModule

    Properties

    ContentRoot

    Root game object in the Content Scene.

    Declaration
    public GameObject ContentRoot { get; }
    Property Value
    Type Description
    GameObject

    ContentScene

    The preview scene being used by the Simulation View to render simulated content objects.

    Declaration
    public Scene ContentScene { get; }
    Property Value
    Type Description
    Scene

    EnvironmentRoot

    Root game object in the Environment Scene.

    Declaration
    public GameObject EnvironmentRoot { get; }
    Property Value
    Type Description
    GameObject

    EnvironmentScene

    The preview scene being used by the Simulation View to render the simulated environment.

    Declaration
    public Scene EnvironmentScene { get; }
    Property Value
    Type Description
    Scene

    instance

    Declaration
    public static SimulationSceneModule instance { get; }
    Property Value
    Type Description
    SimulationSceneModule

    isAssemblyReloading

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

    IsSimulationReady

    Is the simulation scene open and ready to be used.

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

    UsingSimulation

    Are there any simulation scene users.

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

    Methods

    AddContentGameObject(GameObject, Boolean)

    Moves a GameObject to the simulated content scene

    Declaration
    public void AddContentGameObject(GameObject go, bool keepAtRoot = false)
    Parameters
    Type Name Description
    GameObject go

    The GameObject to move

    Boolean keepAtRoot

    Will keep the object at the root level of the simulated content scene otherwise it will be added the simulated content scene root object.

    AddEnvironmentGameObject(GameObject, Boolean)

    Moves a GameObject to the simulated Environment scene

    Declaration
    public void AddEnvironmentGameObject(GameObject go, bool keepAtRoot = false)
    Parameters
    Type Name Description
    GameObject go

    The GameObject to move

    Boolean keepAtRoot

    Will keep the object at the root level of the simulated environment scene otherwise it will be added the simulated environment scene root object.

    AssignCameraToSimulation(Camera)

    Assigns a camera to a simulation with proper settings to render that view.

    Declaration
    public void AssignCameraToSimulation(Camera camera)
    Parameters
    Type Name Description
    Camera camera

    Camera to render a simulation scene

    CloseSimulation()

    Closes the current simulation scene without changing if any objects are using the simulation scene

    Declaration
    public void CloseSimulation()

    ContainsSimulationUser(ScriptableObject)

    Is the Scriptable Object assigned as a user of the Simulation Scene

    Declaration
    public static bool ContainsSimulationUser(ScriptableObject user)
    Parameters
    Type Name Description
    ScriptableObject user

    The object to check if using

    Returns
    Type Description
    Boolean

    True if the object is using the simulation scene

    IsCameraAssignedToSimulationScene(Camera)

    Checks whether the camera is assigned to the simulation.

    Declaration
    public bool IsCameraAssignedToSimulationScene(Camera camera)
    Parameters
    Type Name Description
    Camera camera

    Camera to check if is assigned to the simulation.

    Returns
    Type Description
    Boolean

    True is camera is assigned to the simulation.

    RegisterSimulationUser(ScriptableObject)

    Adds an object to the simulation scene users and opens the simulation scene if it is not already open

    Declaration
    public void RegisterSimulationUser(ScriptableObject user)
    Parameters
    Type Name Description
    ScriptableObject user

    The object using the simulation scene

    RemoveCameraFromSimulation(Camera)

    Camera to be removed from rendering a simulation.

    Declaration
    public void RemoveCameraFromSimulation(Camera camera)
    Parameters
    Type Name Description
    Camera camera

    Camera to stop rendering the simulation scene

    UnregisterSimulationUser(ScriptableObject)

    Removes an object from the simulation scene users. If there are no users after this removal then the simulation scene is closed.

    Declaration
    public void UnregisterSimulationUser(ScriptableObject user)
    Parameters
    Type Name Description
    ScriptableObject user

    The object no longer using the simulation scene

    Events

    SimulationSceneClosing

    Callback for when a simulation scene is closing.

    Declaration
    public static event Action SimulationSceneClosing
    Event Type
    Type Description
    Action

    SimulationSceneOpened

    Callback for when a simulation scene is opened.

    Declaration
    public static event Action SimulationSceneOpened
    Event Type
    Type Description
    Action

    Explicit Interface Implementations

    IModule.LoadModule()

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

    IModule.UnloadModule()

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

    IModuleBehaviorCallbacks.OnBehaviorAwake()

    Declaration
    void IModuleBehaviorCallbacks.OnBehaviorAwake()
    Implements
    IModuleBehaviorCallbacks.OnBehaviorAwake()

    IModuleBehaviorCallbacks.OnBehaviorDestroy()

    Declaration
    void IModuleBehaviorCallbacks.OnBehaviorDestroy()
    Implements
    IModuleBehaviorCallbacks.OnBehaviorDestroy()

    IModuleBehaviorCallbacks.OnBehaviorDisable()

    Declaration
    void IModuleBehaviorCallbacks.OnBehaviorDisable()
    Implements
    IModuleBehaviorCallbacks.OnBehaviorDisable()

    IModuleBehaviorCallbacks.OnBehaviorEnable()

    Declaration
    void IModuleBehaviorCallbacks.OnBehaviorEnable()
    Implements
    IModuleBehaviorCallbacks.OnBehaviorEnable()

    IModuleBehaviorCallbacks.OnBehaviorStart()

    Declaration
    void IModuleBehaviorCallbacks.OnBehaviorStart()
    Implements
    IModuleBehaviorCallbacks.OnBehaviorStart()

    IModuleBehaviorCallbacks.OnBehaviorUpdate()

    Declaration
    void IModuleBehaviorCallbacks.OnBehaviorUpdate()
    Implements
    IModuleBehaviorCallbacks.OnBehaviorUpdate()

    IModuleDependency<MARSSceneModule>.ConnectDependency(MARSSceneModule)

    Declaration
    void IModuleDependency<MARSSceneModule>.ConnectDependency(MARSSceneModule dependency)
    Parameters
    Type Name Description
    MARSSceneModule 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