Class SimulationView | MARS | 1.0.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class SimulationView

    MARS Simulation View displays a separate 3D scene by extending SceneView.

    Inheritance
    Object
    SimulationView
    Namespace: Unity.MARS
    Syntax
    [Serializable]
    public class SimulationView : SceneView, ISimulationView

    Fields

    DeviceViewWindowTitle

    Declaration
    public const string DeviceViewWindowTitle = "Device View"
    Field Value
    Type Description
    String

    SimulationViewWindowTitle

    Declaration
    public const string SimulationViewWindowTitle = "Simulation View"
    Field Value
    Type Description
    String

    Properties

    ActiveSimulationView

    The last Simulation View the user focused

    Declaration
    public static SceneView ActiveSimulationView { get; }
    Property Value
    Type Description
    SceneView

    DesaturateInactive

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

    EditorBackgroundColor

    Declaration
    public static Color EditorBackgroundColor { get; }
    Property Value
    Type Description
    Color

    EnvironmentSceneActive

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

    LastHoveredSimulationOrDeviceView

    The Simulation or Device View that was most recently hovered by the mouse

    Declaration
    public static SceneView LastHoveredSimulationOrDeviceView { get; }
    Property Value
    Type Description
    SceneView

    NormalSceneView

    The primary scene view. Not a Simulation View.

    Declaration
    public static SceneView NormalSceneView { get; }
    Property Value
    Type Description
    SceneView

    SceneType

    Whether this view is in Sim or Device mode

    Declaration
    public ViewSceneType SceneType { get; set; }
    Property Value
    Type Description
    ViewSceneType
    Implements
    ISimulationView.SceneType

    SimulationViews

    List of all Simulation Views

    Declaration
    public static List<SimulationView> SimulationViews { get; }
    Property Value
    Type Description
    List<SimulationView>

    UseXRay

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

    Methods

    AddItemsToMenu(GenericMenu)

    Declaration
    public override void AddItemsToMenu(GenericMenu menu)
    Parameters
    Type Name Description
    GenericMenu menu

    CacheLookAt(Vector3, Quaternion, Single)

    Cache the LookAt information for the Simulation scene type when it is not the active view type

    Declaration
    public void CacheLookAt(Vector3 point, Quaternion direction, float newSize)
    Parameters
    Type Name Description
    Vector3 point

    The position in world space to frame.

    Quaternion direction

    The direction that the Scene view should view the target point from.

    Single newSize

    The amount of camera zoom. Sets size.

    InitWindowInDeviceView()

    Declaration
    public static void InitWindowInDeviceView()

    InitWindowInSimulationView()

    Declaration
    public static void InitWindowInSimulationView()

    OnDestroy()

    Declaration
    protected virtual void OnDestroy()

    OnDisable()

    Declaration
    public override void OnDisable()

    OnEnable()

    Declaration
    public override void OnEnable()

    OnGUI()

    Declaration
    protected override void OnGUI()

    SetupViewAsSimUser(Boolean)

    Setup the view as using the Simulation Scene.

    Declaration
    public void SetupViewAsSimUser(bool forceFrame = false)
    Parameters
    Type Name Description
    Boolean forceFrame

    Force using the framing of the simulated environment settings.

    Implements
    ISimulationView.SetupViewAsSimUser(Boolean)

    SupportsStageHandling()

    Declaration
    protected override bool SupportsStageHandling()
    Returns
    Type Description
    Boolean

    Extension Methods

    SimulationControlsGUI.DrawSimulationViewToolbar(SimulationView)
    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