Ejemplo n.º 1
0
        public void FirstInitialize(string mainPath)
        {
            try
            {
                editorReloading = true;
                EditorUtility.DisplayProgressBar("Reloading", "Reading XML Files...", 0f);

                MainFolderPath = mainPath;

                TexImporterUtility.ReadFromResources(this);
                EditorUtility.DisplayProgressBar("Reloading", "Reading Configurations...", .95f);

                EditorUtility.DisplayProgressBar("Reloading", "Refreshing Instances...", .95f);

                PaintFontList();
                RebuildMaterial();
                PushToDictionaries();
                editorReloading = false;
                CallRedraw();
                EditorUtility.SetDirty(this);
                AssetDatabase.SaveAssets();
            }
            catch (System.Exception ex)
            {
                Debug.LogException(ex);
                Debug.LogError("Failed to Rebuilding TEXDraw's Font Data");
            }
            EditorUtility.ClearProgressBar();
        }
        void ResetWholeDataConfirmed()
        {
            var user = AssetDatabase.LoadAssetAtPath <TextAsset>(MainFolderPath + "/XMLs/TexSymbolDefinitions.xml").text;

            TexImporterUtility.ReadLegacyXMLSymbols(this, false, user);
            var math = AssetDatabase.LoadAssetAtPath <TextAsset>(MainFolderPath + "/XMLs/TexMathDefinitions.xml").text;

            TexImporterUtility.ReadLegacyXMLSymbols(this, true, math);
            var config = AssetDatabase.LoadAssetAtPath <TextAsset>(MainFolderPath + "/XMLs/TEXConfigurations.xml").text;
            var preset = AssetDatabase.LoadAssetAtPath <TextAsset>(MainFolderPath + "/XMLs/TexFontDefinitions.xml").text;

            TexImporterUtility.ReadLegacyPreferences(this, preset, config);
        }