Version: 5.3 (switch to 5.4b)
言語English
  • C#
  • JS

スクリプト言語

好きな言語を選択してください。選択した言語でスクリプトコードが表示されます。

EditorWindow.GetWindow

マニュアルに切り替える
public static EditorWindow GetWindow(Type t, bool utility = false, string title = null, bool focus = true);
public static EditorWindow GetWindow(Type t, bool utility = false, string title = null, bool focus = true);
public static EditorWindow GetWindow(Type t, bool utility = false, string title = null, bool focus = true);
public static EditorWindow GetWindow(Type t, bool utility = false, string title = null, bool focus = true);

パラメーター

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

説明

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

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


何もないシンプルな他のウィンドウにドッキングできないウィンドウ

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

説明

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

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