Class SimulationView
MARS Simulation View displays a separate 3D scene by extending SceneView.
Inheritance
Inherited Members
Namespace: UnityEditor.MARS.Simulation
Assembly: Unity.MARS.Editor.dll
Syntax
[Serializable]
[MovedFrom("Unity.MARS")]
public class SimulationView : SceneView, IHasCustomMenu, ISupportsOverlays, ISimulationView, ISerializationCallbackReceiver
Fields
DeviceViewWindowTitle
Title of the window when in device view mode
Declaration
public const string DeviceViewWindowTitle = "Device View"
Field Value
Type | Description |
---|---|
string |
SimulationViewWindowTitle
Title of the window when in simulation view mode
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
(Obsolete) Desaturate the inactive composite layer
Declaration
[Obsolete]
public bool DesaturateInactive { get; set; }
Property Value
Type | Description |
---|---|
bool |
EditorBackgroundColor
The editor background color form the user's editor preferences
Declaration
public static Color EditorBackgroundColor { get; }
Property Value
Type | Description |
---|---|
Color |
EnvironmentSceneActive
Is the simulation environment layer the active scene in the view
Declaration
public bool EnvironmentSceneActive { get; set; }
Property Value
Type | Description |
---|---|
bool |
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 |
SimulationViews
List of all Simulation Views
Declaration
public static List<SimulationView> SimulationViews { get; }
Property Value
Type | Description |
---|---|
List<SimulationView> |
UseXRay
Use x-ray rendering in the view
Declaration
public bool UseXRay { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
AddItemsToMenu(GenericMenu)
Adds your custom menu items to an Editor Window.
Declaration
public override void AddItemsToMenu(GenericMenu menu)
Parameters
Type | Name | Description |
---|---|---|
GenericMenu | menu |
Overrides
CacheLookAt(Vector3, Quaternion, float)
Cache the LookAt information for the current synthetic environment
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. |
float | newSize | The amount of camera zoom. Sets |
InitWindowInDeviceView()
Initialize the the simulation view window in device view mode.
Declaration
[MenuItem("Window/MARS/Device View", priority = 1023)]
public static void InitWindowInDeviceView()
InitWindowInSimulationView()
Initialize the the simulation view window in simulation view mode.
Declaration
[MenuItem("Window/MARS/Simulation View", priority = 1022)]
public static void InitWindowInSimulationView()
OnDestroy()
OnDestroy is called to close the EditorWindow window.
Declaration
protected virtual void OnDestroy()
OnDisable()
Declaration
public override void OnDisable()
Overrides
OnEnable()
Declaration
public override void OnEnable()
Overrides
OnGUI()
Declaration
[Obsolete]
protected override void OnGUI()
Overrides
OnSceneGUI()
Declaration
protected override void OnSceneGUI()
Overrides
SetupViewAsSimUser(bool)
Setup the view as using the Simulation Scene.
Declaration
public void SetupViewAsSimUser(bool forceFrame = false)
Parameters
Type | Name | Description |
---|---|---|
bool | forceFrame | Force using the framing of the simulated environment settings. |
SupportsStageHandling()
Scene view does not support stage handling and will not switch when stage is changed
Declaration
protected override bool SupportsStageHandling()
Returns
Type | Description |
---|---|
bool |
|