/// <summary>
		/// Saves a ChatMapperProject as XML with the specified filename.
		/// </summary>
		/// <param name="filename">Filename to save.</param>
		public static void Save(ChatMapperProject chatMapperProject, string filename) {
			#if UNITY_METRO
			Debug.LogWarning("ChatMapperTools.Save() is not supported in Windows Store apps.");
			#else
			XmlSerializer xmlSerializer = new XmlSerializer(typeof(ChatMapperProject));
			StreamWriter streamWriter = new StreamWriter(filename, false, System.Text.Encoding.Unicode);
			xmlSerializer.Serialize(streamWriter, chatMapperProject);
			streamWriter.Close();
			#endif
		}
Esempio n. 2
0
        /// <summary>
        /// Saves a ChatMapperProject as XML with the specified filename.
        /// </summary>
        /// <param name="filename">Filename to save.</param>
        public static void Save(ChatMapperProject chatMapperProject, string filename)
        {
#if UNITY_WINRT
            Debug.LogWarning("ChatMapperUtility.Save() is not supported in Universal Windows Platform.");
#else
            XmlSerializer xmlSerializer = new XmlSerializer(typeof(ChatMapperProject));
            StreamWriter  streamWriter  = new StreamWriter(filename, false, System.Text.Encoding.Unicode);
            xmlSerializer.Serialize(streamWriter, chatMapperProject);
            streamWriter.Close();
#endif
        }
Esempio n. 3
0
 /// <summary>
 /// Saves a ChatMapperProject as XML with the specified filename.
 /// </summary>
 /// <param name="filename">Filename to save.</param>
 public static void Save(ChatMapperProject chatMapperProject, string filename)
 {
                 #if UNITY_METRO
     Debug.LogWarning("ChatMapperTools.Save() is not supported in Windows Store apps.");
                 #else
     XmlSerializer xmlSerializer = new XmlSerializer(typeof(ChatMapperProject));
     StreamWriter  streamWriter  = new StreamWriter(filename, false, System.Text.Encoding.Unicode);
     xmlSerializer.Serialize(streamWriter, chatMapperProject);
     streamWriter.Close();
                 #endif
 }
 private static void SaveChatMapperProject(string filename, ChatMapperProject cmp)
 {
     XmlSerializer xmlSerializer = new XmlSerializer(typeof(ChatMapperProject));
     StreamWriter streamWriter = new StreamWriter(filename, false, System.Text.Encoding.Unicode);
     xmlSerializer.Serialize(streamWriter, cmp);
     streamWriter.Close();
 }
 private static ChatMapperProject DatabaseToChatMapperProject(DialogueDatabase database, bool exportActors, bool exportItems, bool exportLocations, bool exportVariables, bool exportConversations)
 {
     maxEntryCount = 0;
     ChatMapperProject cmp = new ChatMapperProject();
     cmp.Title = database.name;
     cmp.Version = "1.5.1.0"; // The version of Chat Mapper XML format that imports properly.
     cmp.Author = database.author;
     cmp.EmphasisColor1 = ColorToCmpStyle(database.emphasisSettings[0].color);
     cmp.EmphasisStyle1 = EmphasisToCmpStyle(database.emphasisSettings[0]);
     cmp.EmphasisColor2 = ColorToCmpStyle(database.emphasisSettings[1].color);
     cmp.EmphasisStyle2 = EmphasisToCmpStyle(database.emphasisSettings[1]);
     cmp.EmphasisColor3 = ColorToCmpStyle(database.emphasisSettings[2].color);
     cmp.EmphasisStyle3 = EmphasisToCmpStyle(database.emphasisSettings[2]);
     cmp.EmphasisColor4 = ColorToCmpStyle(database.emphasisSettings[3].color);
     cmp.EmphasisStyle4 = EmphasisToCmpStyle(database.emphasisSettings[3]);
     cmp.Description = database.description;
     cmp.UserScript = database.globalUserScript;
     cmp.Assets = AssetsToCmp(database, exportActors, exportItems, exportLocations, exportVariables, exportConversations);
     return cmp;
 }