public static void InitEditorWindow() { if (!curWindow) { curWindow = (vShooterIKAdjustWindow)EditorWindow.GetWindow <vShooterIKAdjustWindow>("IK Adjust Window"); curWindow.titleContent.image = Resources.Load("icon_v2") as Texture2D; } }
//public void OnSceneGUI() //{ // DrawSceneGizmos(); //} void Update() { this.minSize = new Vector2(300, 300); if (EditorApplication.isPlaying && !EditorApplication.isPaused) { if (curWindow == null) { curWindow = this; } if (Selection.activeTransform && (ikController == null || (Selection.activeGameObject != ikController.gameObject && Selection.activeTransform.GetComponent <vIShooterIKController>() != null))) { ikController = Selection.activeGameObject.GetComponent <vIShooterIKController>(); } Repaint(); } }