/// <summary> /// Merges a source database into a destination database. Note that if the destination database /// has an actor marked IsPlayer, then the source database will use this actor instead of /// any IsPlayer actors in the source database. Similarly, only one Alert variable will be added. /// This variation allows selective merge of only certain types of assets. /// </summary> /// <param name="destination">Destination.</param> /// <param name="source">Source.</param> /// <param name="conflictingIDRule">Specifies how to handle conflicting IDs.</param> public static void Merge(DialogueDatabase destination, DialogueDatabase source, ConflictingIDRule conflictingIDRule, bool mergeProperties, bool mergeActors, bool mergeItems, bool mergeLocations, bool mergeVariables, bool mergeConversations) { if ((destination != null) && (source != null)) { switch (conflictingIDRule) { case ConflictingIDRule.AllowConflictingIDs: MergeAllowConflictingIDs(destination, source, mergeProperties, mergeActors, mergeItems, mergeLocations, mergeVariables, mergeConversations); break; case ConflictingIDRule.AssignUniqueIDs: MergeAssignUniqueIDs(destination, source, mergeProperties, mergeActors, mergeItems, mergeLocations, mergeVariables, mergeConversations); break; default: Debug.LogError(string.Format("{0}: Internal error. Unsupported merge type: {1}", new System.Object[] { DialogueDebug.Prefix, conflictingIDRule })); break; } } }
/// <summary> /// Merges a source database into a destination database. Note that if the destination database /// has an actor marked IsPlayer, then the source database will use this actor instead of /// any IsPlayer actors in the source database. Similarly, only one Alert variable will be added. /// </summary> /// <param name="destination">Destination.</param> /// <param name="source">Source.</param> /// <param name="conflictingIDRule">Specifies how to handle conflicting IDs.</param> public static void Merge(DialogueDatabase destination, DialogueDatabase source, ConflictingIDRule conflictingIDRule) { Merge(destination, source, conflictingIDRule, true, true, true, true, true, true); }
/// <summary> /// Merges a source database into a destination database. Note that if the destination database /// has an actor marked IsPlayer, then the source database will use this actor instead of /// any IsPlayer actors in the source database. Similarly, only one Alert variable will be added. /// This variation allows selective merge of only certain types of assets. /// </summary> /// <param name="destination">Destination.</param> /// <param name="source">Source.</param> /// <param name="conflictingIDRule">Specifies how to handle conflicting IDs.</param> public static void Merge(DialogueDatabase destination, DialogueDatabase source, ConflictingIDRule conflictingIDRule, bool mergeProperties, bool mergeActors, bool mergeItems, bool mergeLocations, bool mergeVariables, bool mergeConversations) { if ((destination != null) && (source != null)) { switch (conflictingIDRule) { case ConflictingIDRule.ReplaceConflictingIDs: MergeReplaceConflictingIDs(destination, source, mergeProperties, mergeActors, mergeItems, mergeLocations, mergeVariables, mergeConversations); break; case ConflictingIDRule.AllowConflictingIDs: MergeAllowConflictingIDs(destination, source, mergeProperties, mergeActors, mergeItems, mergeLocations, mergeVariables, mergeConversations); break; case ConflictingIDRule.AssignUniqueIDs: MergeAssignUniqueIDs(destination, source, mergeProperties, mergeActors, mergeItems, mergeLocations, mergeVariables, mergeConversations); break; default: Debug.LogError(string.Format("{0}: Internal error. Unsupported merge type: {1}", new System.Object[] { DialogueDebug.Prefix, conflictingIDRule })); break; } } }