-
Notifications
You must be signed in to change notification settings - Fork 11
SceneView
This class contains all infos of the scene tab in the editor, it can be used to modify the scene camera properties, focus or search objects in an opened scene view.
public bool m_SceneLighting;
Is the lighting enabled in the scene view, can be get and set.
public double lastFramingTime;
Time since the last frame select ('f' press). Uses EditorApplication.timeSinceStartup to get time.
public bool m_AudioPlay;
Is audio enabled in scene view, can be get and set.
public bool m_ValidateTrueMetals
public bool in2DMode { get; set; }
Is the scene camera in 2D mode, can be get and set.
public Quaternion rotation { get; set; }
Rotation of the scene camera, can be get and set.
public Vector3 pivot { get; set; }
Pivot used to rotate the scene camera in ortho mode / when option is hold.
public Camera camera { get; }
Scene camera.
public bool orthographic { get; set; }
Is the camera in orthographic mode, can be get and set.
public float cameraDistance { get; }
public Quaternion lastSceneViewRotation { get; set; }
last scene camera rotation when it's 2D mode was changed.
public SceneViewState sceneViewState { get; }
Scene view state, allow to control if fog, skybox, flares, ... are visible.
public
DrawCameraMode renderMode { get; set; }
RenderMode of the scene camera, can be get and set.
public bool isRotationLocked { get; set; }
public float size { get; set; }
public static SceneView lastActiveSceneView { get; }
The last scene view used by the user.
public static SceneView currentDrawingSceneView { get; }
The current rendering scene view in the editor.
public static ArrayList sceneViews { get; }
All the opened Scene tabs in the editor.
public static bool FrameLastActiveSceneView();
Send a FrameSelected event to the last active scene tab.
public static bool FrameLastActiveSceneViewWithLock();
Send a FrameSelectedWithLock event to the last active scene tab.
public static Camera[] GetAllSceneCameras();
Returns all the cameras used in all the scene tabs.
public static void RepaintAll();
Call the Repaint method on all scene views.
public static void ShowCompileErrorNotification();
Show a notification with the message "All compiler errors have to be fixed before you can enter playmode!".
public static OnSceneFunc onSceneGUIDelegate;
public virtual void AddItemsToMenu(GenericMenu menu);
public void AlignViewToObject(Transform t);
public void AlignWithView();
public void FixNegativeSize();
public bool Frame(Bounds bounds, bool instant = true);
public bool FrameSelected(bool lockView);
public bool FrameSelected();
public void LookAt(Vector3 pos, Quaternion rot, float newSize, bool ortho);
public void LookAt(Vector3 pos, Quaternion rot, float newSize, bool ortho, bool instant);
public void LookAt(Vector3 pos, Quaternion rot, float newSize);
public void LookAt(Vector3 pos, Quaternion rot);
public void LookAt(Vector3 pos);
public void LookAtDirect(Vector3 pos, Quaternion rot, float newSize);
public void LookAtDirect(Vector3 pos, Quaternion rot);
public void MoveToView();
public void MoveToView(Transform target);
public void OnSelectionChange();
public void SetSceneViewFiltering(bool enable);
public void SetSceneViewShaderReplace(Shader shader, string replaceString);
public delegate void OnSceneFunc(SceneView sceneView);