static void CreateWindow() { //utility: false:可以合并有遮挡的窗口 true:置顶的窗口 TemplateWindow templateWindow = (TemplateWindow)GetWindow(typeof(TemplateWindow), true, "模板窗口", false); //templateWindow.titleContent = new GUIContent("模板窗口"); templateWindow.position = new Rect(Screen.width / 2 - 300, Screen.height / 2 - 200, 600, 400); templateWindow.Show(); }
/// <summary> /// テンプレート編集クリック時の処理 /// </summary> private void EditTemplateClick() { var window = new TemplateWindow() { Owner = this._window }; window.ShowDialog(); }