Interface ISimulationView
Common interface for objects that draw a simulation view.
Namespace: UnityEditor.MARS.Simulation
Assembly: Unity.MARS.Editor.dll
Syntax
[MovedFrom("Unity.MARS")]
public interface ISimulationView
Properties
SceneType
The type of scene being viewed in the simulation view.
Declaration
ViewSceneType SceneType { get; set; }
Property Value
| Type | Description |
|---|---|
| ViewSceneType |
camera
The Camera that is rendering this simulation view.
Declaration
Camera camera { get; }
Property Value
| Type | Description |
|---|---|
| Camera |
isRotationLocked
Whether the view camera can be rotated.
Declaration
bool isRotationLocked { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
orthographic
Whether the view camera is set to orthographic mode.
Declaration
bool orthographic { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
pivot
The center point, or pivot, of the Scene view.
Declaration
Vector3 pivot { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
rotation
The direction of the camera to the pivot of the view.
Declaration
Quaternion rotation { get; set; }
Property Value
| Type | Description |
|---|---|
| Quaternion |
size
The size of the view measured diagonally.
Declaration
float size { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Methods
LookAt(Vector3, Quaternion, float, bool, bool)
Look at a specific point from a given direction with a given zoom level, enabling and disabling perspective
Declaration
void LookAt(Vector3 point, Quaternion direction, float newSize, bool ortho, bool instant)
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 |
| bool | ortho | Whether the camera focus is in orthographic mode (true) or perspective mode (false). |
| bool | instant | Apply the movement immediately (true) or animate the transition (false). |
Repaint()
Make the view repaint.
Declaration
void Repaint()
SetupViewAsSimUser(bool)
Setup the view as using the Simulation Scene.
Declaration
void SetupViewAsSimUser(bool forceFrame = false)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | forceFrame | Force using the framing of the simulated environment settings. |