コード例 #1
0
 void Generate()
 {
     try
     {
         XmlSheetSerializer.GenerateGroupBinaryFile(mCurGroup);
         AssetDatabase.Refresh();
         EditorUtility.DisplayDialog("XmlSheet Serializer", string.Format("'{0}' finished !", mCurGroup.group), "OK");
     }
     catch (Exception e)
     {
         Debug.LogException(e);
         EditorUtility.DisplayDialog("Xml Serialize Failed !", "See console for more details.\n\n" + e.Message, "OK");
     }
 }
コード例 #2
0
        //[MenuItem("FunPlus/Configs/Serialize All XmlSheets", false, 4)]
        static void SerializeAllXmls()
        {
            List <XmlSheetGroupSettings> groups = ConfigSettings.ReadXmlSheetGroupSettings();

            try
            {
                List <string> gs = new List <string>();
                for (int i = 0, imax = groups.Count; i < imax; i++)
                {
                    XmlSheetGroupSettings group = groups[i];
                    XmlSheetSerializer.GenerateGroupBinaryFile(group);
                    gs.Add(group.group);
                }
                AssetDatabase.Refresh();
                EditorUtility.DisplayDialog("XmlSheet Serializer", "Xmls Serializer !\n" + string.Join("\n", gs.ToArray()), "OK");
            }
            catch (Exception e)
            {
                Debug.LogException(e);
                EditorUtility.DisplayDialog("XmlSheet Serialize Failed !", "See console for more details.\n\n" + e.Message, "OK");
            }
        }