Version: 2021.1
言語: 日本語

SceneView

class in UnityEditor

/

継承:EditorWindow


実装インターフェース:IHasCustomMenu

マニュアルに切り替える

説明

Use this class to manage SceneView settings, change the SceneView camera properties, subscribe to events, call SceneView methods, and render open scenes.

Static 変数

currentDrawingSceneViewThe SceneView that is being drawn.
lastActiveSceneViewThe SceneView that was most recently in focus.
sceneViewsThe list of all open Scene view windows.
selectedOutlineColorGets the Color of selected outline.

変数

audioPlayEnables or disables Scene view audio effects.
cameraThe Camera that is rendering this SceneView.
cameraDistanceThe distance from camera to pivot.
cameraModeThe current DrawCameraMode for the Scene view camera.
cameraSettingsUse CameraSettings to set the properties for the SceneView Camera.
drawGizmosSets the visibility of all Gizmos in the Scene view.
in2DModeWhether the SceneView is in 2D mode.
isRotationLockedWhether the Scene view camera can be rotated.
lastSceneViewRotationWhen the Scene view is in 2D mode, this property contains the last camera rotation.
orthographicWhether the Scene view camera is set to orthographic mode.
pivotThe central point that the camera orbits within the Scene view.
rotationThe direction of the camera to the pivot of the SceneView.
sceneLightingWhether lighting is enabled or disabled in the Scene view.
sceneViewStateUse SceneViewState to set the debug options for the Scene view.
showGridGets or sets whether to enable the grid for an instance of the SceneView.
sizeThe size of the Scene view measured diagonally.
validateTrueMetalsWhether the albedo is black for materials with an average specular color above 0.45.

Public 関数

AlignViewToObjectMoves the Scene view to frame a transform.
AlignWithViewAligns the current selection with the position and rotation of the Scene view camera.
FrameFrames the given bounds in the Scene view.
FrameSelectedFrame the object selection in the Scene view.
IsCameraDrawModeEnabledReturns true if mode is enabled in the current rendering setup, including custom validators.
IsCameraDrawModeSupportedChecks if the current rendering configuration supports the CameraMode. The check includes custom validators.
LookAtMoves the Scene view to focus on a target.
LookAtDirect LookAt without animating the scene movement.
MoveToViewTransforms all selected object to the scene pivot.
ResetCameraSettingsResets the CameraSettings for the SceneView Camera to default.
SetSceneViewShaderReplaceSets a replacement shader for rendering this Scene view.

Protected 関数

SupportsStageHandlingOverride this method to control whether the Scene view should change when you switch from one stage to another stage.

Static 関数

AddCameraModeAdd a custom camera mode to the Scene view camera mode list.
ClearUserDefinedCameraModesRemove all user-defined camera modes.
FrameLastActiveSceneViewFrames the currently selected object(s) in the last active Scene view.
GetAllSceneCamerasRetrieves an array of all camera components from all open Scene views.
GetBuiltinCameraModeGets the built-in CameraMode that matches the specified DrawCameraMode.
RepaintAllRepaints every open SceneView.

Events

beforeSceneGuiThe event issued when the OnGUI method is called.
duringSceneGuiSubscribe to this event to receive a callback whenever the Scene view calls the OnGUI method.
gridVisibilityChangedInvoked when grid visibility changes.
onCameraModeChangedAn event that is invoked when the selected cameraMode changes.

継承メンバー

Static 変数

focusedWindow現在キーボードフォーカスがある EditorWindow (Read Only)
mouseOverWindow現在マウスのカーソルの下の EditorWindow (Read Only)

変数

autoRepaintOnSceneChangeDoes the window automatically repaint whenever the Scene has changed?
dockedReturns true if EditorWindow is docked.
hasFocusReturns true if EditorWindow is focused.
hasUnsavedChangesWhen set to true in a derived class, the editor will prompt the user to save unsaved changes if the window is about to be closed.
maximizedIs this window maximized?
maxSizeこのウィンドウの最大サイズ
minSizeこのウィンドウの最小サイズ
positionThe desired position of the window in screen space.
rootVisualElementRetrieves the root visual element of this window hierarchy.
saveChangesMessageThe message that displays to the user if they are prompted to save
titleContentGUIContent は EditorWindows のタイトルを描画するために使用します。
wantsLessLayoutEventsSpecifies whether a layout pass is performed before all user events (for example, EventType.MouseDown or [[EventType, KeyDown]]), or is only performed before repaint events.
wantsMouseEnterLeaveWindowChecks whether MouseEnterWindow and MouseLeaveWindow events are received in the GUI in this Editor window.
wantsMouseMoveChecks whether MouseMove events are received in the GUI in this Editor window.
hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameオブジェクト名

Public 関数

BeginWindowsすべてのポップアップウィンドウを表示するための開始領域をマークします
Closeエディターウィンドウを閉じます
EndWindows EditorWindow.BeginWindows で開始したウィンドウグループを閉じます
FocusMoves keyboard focus to another EditorWindow.
GetExtraPaneTypesGets the extra panes associated with the window.
RemoveNotification表示している通知メッセージを停止します
Repaintウィンドウの再描画を行います
SaveChangesPerforms a save action on the contents of the window.
SendEventEvent をウィンドウに送信します
ShowShow the EditorWindow window.
ShowAsDropDownドロップダウンの動作とスタイルを持つウィンドウを表示します
ShowAuxWindow補助ウィンドウでエディターウィンドウを表示します
ShowModalShow modal editor window.
ShowModalUtilityShow the EditorWindow as a floating modal window.
ShowNotification通知メッセージを表示します
ShowPopupポップアップスタイルのフレーミングを使用するエディターウィンドウを表示します
ShowUtilityフローティングのユーティリティウィンドウとしてエディターウィンドウを表示します
GetInstanceIDGets the instance ID of the object.
ToStringReturns the name of the object.

Static 関数

CreateWindowCreates an EditorWindow of type T.
FocusWindowIfItsOpenエディターウィンドウが開いている場合に探し出し、最初に見つけたものにフォーカスを当てます
GetWindow現在画面上にある t タイプの最初に見つけた EditorWindow を返します
GetWindowWithRect現在画面上にある t タイプの最初に見つけた EditorWindow を返します
HasOpenInstancesChecks if an editor window is open.
DestroyRemoves a GameObject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindObjectOfTypeタイプ type から最初に見つけたアクティブのオブジェクトを返します
FindObjectsOfTypeGets a list of all loaded objects of Type type.
Instantiateoriginal のオブジェクトをクローンします
CreateInstanceScriptableObject のインスタンスを作成します。

Operator

boolオブジェクトが存在するかどうか
operator !=二つのオブジェクトが異なるオブジェクトを参照しているか比較します
operator ==2つのオブジェクト参照が同じオブジェクトを参照しているか比較します。

メッセージ

Awake新規ウィンドウが開くときに呼び出されます
CreateGUICreateGUI is called when the EditorWindow's rootVisualElement is ready to be populated.
hasUnsavedChangesWhen set to true in a derived class, the editor will prompt the user to save unsaved changes if the window is about to be closed.
OnDestroyOnDestroy is called to close the EditorWindow window.
OnFocusウィンドウがキーボードフォーカスを取得するときに呼び出されます
OnGUIここに独自のエディターの GUI を実装します
OnHierarchyChangeHandler for message that is sent when an object or group of objects in the hierarchy changes.
OnInspectorUpdateOnInspectorUpdate は更新する機会をインスペクターに与え、秒当たり 10 回呼ばれます
OnLostFocusウィンドウがキーボードフォーカスを失ったときに呼び出されます
OnProjectChangeHandler for message that is sent whenever the state of the project changes.
OnSelectionChange選択が変更されるたび呼び出されます
saveChangesMessageThe message that displays to the user if they are prompted to save
Updateすべての表示されているウィンドウは秒あたり複数回呼び出されます
Awake ScriptableObject スクリプトを開始するとき、この関数は呼び出されます。
OnDestroyScriptableObject が破棄されるとき、この関数は呼び出されます。
OnDisableScriptableObject クラスのオブジェクトがスコープを外れるとき、この関数は呼び出されます。
OnEnableオブジェクトがロードされたとき、この関数は呼び出されます。
OnValidateEditor-only function that Unity calls when the script is loaded or a value changes in the Inspector.
Resetデフォルト値にリセットします