private void OnGUI() { if (window == null) { window = this; } root.OnDrawGUI(new Rect(0, 0, position.width, position.height), this); }
public static void InitWindow() { window = GetWindow <ComponentEditorWindow>(); window.titleContent = new GUIContent("Component Editor"); window.Construct(); //window.wantsMouseMove = true; window.Show(); //UnityEditor.Editor. }