/// <summary> /// データを強制的に作成 /// </summary> public static ProjectBookmarkData CreateBookmarkDataImmediately() { return(GenericDataGenerator.CreateDataImmediately <ProjectBookmarkData>( ExportConfig.RootFolderName, ExportConfig.SaveFolderRelativePath, ExportConfig.DefaultNewTodoName )); }
/// <summary> /// ウィンドウの描画処理 /// </summary> private void OnGUI() { if (window == null) { window = this; } if (needReloadData) { needReloadData = false; this.ReloadDatas(); } if (bookmarkDatas == null) { this.ReloadDatas(); } if (this.bookmarkList == null) { this.RebuildBookmarkList(); } if (willRegisterAssets != null) { var data = this.bookmarkDatas[this.currentBookmarkIndex]; data.Assets.AddRange(willRegisterAssets); EditorUtility.SetDirty(data); willRegisterAssets = null; } EditorGUILayout.LabelField(MenuConfig.GUI_WINDOW_PROJECT_TEXT_OVERVIEW); EditorGUILayout.BeginHorizontal(); EditorGUI.BeginChangeCheck(); EditorGUILayout.LabelField("Bookmark", GUILayout.Width(LabelWidth)); int index = EditorGUILayout.Popup(this.currentBookmarkIndex, this.popupDisplayedOptions); if (EditorGUI.EndChangeCheck()) { if (index < bookmarkDatas.Length) { this.currentBookmarkIndex = index; this.currentBookmarkName = this.bookmarkDatas[this.currentBookmarkIndex].name; this.RebuildBookmarkList(); } else // New... を選択した場合 { // DataGenerator.CreateBookmarkData(); // DataGenerator.CreateBookmarkDataImmediately(); var instance = GenericDataGenerator.CreateDataInProject <ProjectBookmarkData>(ExportConfig.DefaultAssetName); if (instance != null) { this.ReloadDatas(); this.RebuildBookmarkList(); } } } if (GUILayout.Button("Select", EditorStyles.miniButton, GUILayout.Width(ButtonWidth))) { EditorGUIUtility.PingObject(bookmarkDatas[this.currentBookmarkIndex]); } EditorGUILayout.EndHorizontal(); this.bookmarkList.DoLayoutList(); CustomUI.VersionLabel(); }
/// <summary> /// データを強制的に作成 /// </summary> public static ProjectBookmarkData CreateBookmarkDataImmediately() { return(GenericDataGenerator.CreateDataImmediately <ProjectBookmarkData>( ExportConfig.DefaultAssetName )); }