Class SimulationView
MARS Simulation View displays a separate 3D scene by extending SceneView.
Namespace: UnityEditor.MARS.Simulation
Syntax
public class SimulationView : SceneView, ISimulationView, ISerializationCallbackReceiver
Fields
DeviceViewWindowTitle
Title of the window when in device view mode
Declaration
public const string DeviceViewWindowTitle = null
Field Value
Type | Description |
---|---|
String |
SimulationViewWindowTitle
Title of the window when in simulation view mode
Declaration
public const string SimulationViewWindowTitle = null
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
public bool DesaturateInactive { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
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 |
---|---|
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
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 |
---|---|
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 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. |
Single | newSize | The amount of camera zoom. Sets |
InitWindowInDeviceView()
Initialize the the simulation view window in device view mode.
Declaration
public static void InitWindowInDeviceView()
InitWindowInSimulationView()
Initialize the the simulation view window in simulation view mode.
Declaration
public static void InitWindowInSimulationView()
OnDestroy()
OnDestroy is called to close the EditorWindow window.
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
SupportsStageHandling()
Scene view does not support stage handling and will not switch when stage is changed
Declaration
protected override bool SupportsStageHandling()
Returns
Type | Description |
---|---|
Boolean |
|