private void DrawMergeSection()
 {
     EditorWindowTools.StartIndentedSection();
     EditorGUILayout.BeginVertical(GroupBoxStyle);
     EditorGUILayout.HelpBox("Use this feature to add the contents of another database to this database.", MessageType.None);
     EditorGUILayout.BeginHorizontal();
     EditorGUILayout.LabelField("Database to Merge into " + database.name);
     databaseToMerge = EditorGUILayout.ObjectField(databaseToMerge, typeof(DialogueDatabase), false) as DialogueDatabase;
     EditorGUILayout.EndHorizontal();
     mergeProperties    = EditorGUILayout.Toggle("Merge DB Properties", mergeProperties);
     mergeActors        = EditorGUILayout.Toggle("Merge Actors", mergeActors);
     mergeItems         = EditorGUILayout.Toggle("Merge Items", mergeItems);
     mergeLocations     = EditorGUILayout.Toggle("Merge Locations", mergeLocations);
     mergeVariables     = EditorGUILayout.Toggle("Merge Variables", mergeVariables);
     mergeConversations = EditorGUILayout.Toggle("Merge Conversations", mergeConversations);
     EditorGUILayout.BeginHorizontal();
     conflictingIDRule = (DatabaseMerger.ConflictingIDRule)EditorGUILayout.EnumPopup(new GUIContent("If IDs Conflict", "Replace Existing IDs: If the same ID exists in both databases, replace the original one with the new one.\nAllow Conflicting IDs: Append assets even if IDs conflict.\nAssign Unique IDs: Append and assign new IDs to assets from source database."), conflictingIDRule, GUILayout.Width(300));
     GUILayout.FlexibleSpace();
     EditorGUI.BeginDisabledGroup(databaseToMerge == null);
     if (GUILayout.Button("Merge...", GUILayout.Width(100)))
     {
         if (ConfirmMerge())
         {
             MergeDatabase();
         }
     }
     EditorGUI.EndDisabledGroup();
     EditorGUILayout.EndHorizontal();
     EditorGUILayout.EndVertical();
     EditorWindowTools.EndIndentedSection();
 }
Esempio n. 2
0
 private void DrawMergeSection()
 {
     EditorWindowTools.StartIndentedSection();
     EditorGUILayout.BeginVertical(GroupBoxStyle);
     EditorGUILayout.HelpBox("Use this feature to add the contents of another database to this database.", MessageType.None);
     EditorGUILayout.BeginHorizontal();
     EditorGUILayout.LabelField("Database to Merge into " + database.name);
     databaseToMerge = EditorGUILayout.ObjectField(databaseToMerge, typeof(DialogueDatabase), false) as DialogueDatabase;
     EditorGUILayout.EndHorizontal();
     mergeProperties    = EditorGUILayout.Toggle("Merge DB Properties", mergeProperties);
     mergeActors        = EditorGUILayout.Toggle("Merge Actors", mergeActors);
     mergeItems         = EditorGUILayout.Toggle("Merge Items", mergeItems);
     mergeLocations     = EditorGUILayout.Toggle("Merge Locations", mergeLocations);
     mergeVariables     = EditorGUILayout.Toggle("Merge Variables", mergeVariables);
     mergeConversations = EditorGUILayout.Toggle("Merge Conversations", mergeConversations);
     EditorGUILayout.BeginHorizontal();
     conflictingIDRule = (DatabaseMerger.ConflictingIDRule)EditorGUILayout.EnumPopup("If IDs Conflict", conflictingIDRule, GUILayout.Width(300));
     GUILayout.FlexibleSpace();
     EditorGUI.BeginDisabledGroup(databaseToMerge == null);
     if (GUILayout.Button("Merge...", GUILayout.Width(100)))
     {
         if (ConfirmMerge())
         {
             MergeDatabase();
         }
     }
     EditorGUI.EndDisabledGroup();
     EditorGUILayout.EndHorizontal();
     EditorGUILayout.EndVertical();
     EditorWindowTools.EndIndentedSection();
 }
 private void DrawMergeSection()
 {
     EditorWindowTools.StartIndentedSection();
     EditorGUILayout.BeginVertical(GroupBoxStyle);
     EditorGUILayout.HelpBox("Use this feature to add the contents of another database to this database.", MessageType.None);
     EditorGUILayout.BeginHorizontal();
     EditorGUILayout.LabelField("Database to Merge into " + database.name);
     databaseToMerge = EditorGUILayout.ObjectField(databaseToMerge, typeof(DialogueDatabase), false) as DialogueDatabase;
     EditorGUILayout.EndHorizontal();
     mergeProperties = EditorGUILayout.Toggle("Merge DB Properties", mergeProperties);
     mergeActors = EditorGUILayout.Toggle("Merge Actors", mergeActors);
     mergeItems = EditorGUILayout.Toggle("Merge Items", mergeItems);
     mergeLocations = EditorGUILayout.Toggle("Merge Locations", mergeLocations);
     mergeVariables = EditorGUILayout.Toggle("Merge Variables", mergeVariables);
     mergeConversations = EditorGUILayout.Toggle("Merge Conversations", mergeConversations);
     EditorGUILayout.BeginHorizontal();
     conflictingIDRule = (DatabaseMerger.ConflictingIDRule) EditorGUILayout.EnumPopup("If IDs Conflict", conflictingIDRule, GUILayout.Width(300));
     GUILayout.FlexibleSpace();
     EditorGUI.BeginDisabledGroup(databaseToMerge == null);
     if (GUILayout.Button("Merge...", GUILayout.Width (100))) {
         if (ConfirmMerge()) MergeDatabase();
     }
     EditorGUI.EndDisabledGroup();
     EditorGUILayout.EndHorizontal();
     EditorGUILayout.EndVertical();
     EditorWindowTools.EndIndentedSection();
 }