Version: 2018.4
public static EditorWindow GetWindow (Type t, bool utility= false, string title= null, bool focus= true);

パラメーター

tウィンドウのタイプ。EditorWindow から派生したタイプでなくてはいけません
utilityフローティングのユーティリティウィンドウを作成するには、これを True に設定し、通常のウィンドウを作成する場合は False を設定します。
titleGetWindow が新しいウィンドウを作成する場合、このタイトルを取得します。この値が null の場合、クラス名をタイトルとして使用します。
focusそれがすでに存在する場合、ウィンドウフォーカスを与えるかどうか ( GetWindow が新しいウィンドウを作成する場合、それは常にフォーカスを取得します)。

説明

現在画面上にある t タイプの最初に見つけた EditorWindow を返します

存在しない場合、新しいウィンドウを作成して表示し、そのインスタンスを返します。


Simple Empty non-dockable window.

using UnityEngine;
using UnityEditor;

// Simple script that creates a new non-dockable window public class EditorWindowTest : EditorWindow { [MenuItem("Example/Display simple Window")] static void Initialize() { EditorWindowTest window = (EditorWindowTest)EditorWindow.GetWindow(typeof(EditorWindowTest), true, "My Empty Window"); } }

public static T GetWindow ();
public static T GetWindow (bool utility);
public static T GetWindow (bool utility, string title);
public static T GetWindow (string title);
public static T GetWindow (string title, bool focus);
public static T GetWindow (bool utility, string title, bool focus);

パラメーター

Tウィンドウのタイプ。EditorWindow から派生したタイプでなくてはいけません
utilityフローティングのユーティリティウィンドウを作成するには、これを True に設定し、通常のウィンドウを作成する場合は False を設定します。
titleGetWindow が新しいウィンドウを作成する場合、このタイトルを取得します。この値が null の場合、クラス名をタイトルとして使用します。
focusそれがすでに存在する場合、ウィンドウフォーカスを与えるかどうか ( GetWindow が新しいウィンドウを作成する場合、それは常にフォーカスを取得します)。

説明

スクリーンの現在の T 型の最初の EditorWindow を返します

存在しない場合、新しいウィンドウを作成して表示し、そのインスタンスを返します。


public static T GetWindow (params Type[] desiredDockNextTo);
public static T GetWindow (string title, params Type[] desiredDockNextTo);
public static T GetWindow (string title, bool focus, params Type[] desiredDockNextTo);

パラメーター

Tウィンドウのタイプ。EditorWindow から派生したタイプでなくてはいけません
titleGetWindow が新しいウィンドウを作成する場合、このタイトルを取得します。この値が null の場合、クラス名をタイトルとして使用します。
desiredDockNextToそのウィンドウの上にドッキングしようとする EditorWindow の型の配列
focusそれがすでに存在する場合、ウィンドウフォーカスを与えるかどうか ( GetWindow が新しいウィンドウを作成する場合、それは常にフォーカスを取得します)。

説明

スクリーンの現在の T 型の最初の EditorWindow を返します

If there is none, creates and shows new window and returns the instance of it. The created window will attempt to be docked next to the first founds specified window type.