Ejemplo n.º 1
0
 public void Prepare(string output)
 {
     CapsPHFontEditor.ReplaceAllPHFonts();
     _PHFonts.Clear();
     _PHFontDescs.Clear();
     _ReplacementFonts.Clear();
     _ReplacementDescs.Clear();
     foreach (var phpath in CapsPHFontEditor._PHFontAssetNameToFontName.Keys)
     {
         _PHFonts.Add(phpath);
         if (phpath.EndsWith(".otf"))
         {
             var phdesc = phpath.Substring(0, phpath.Length - ".otf".Length) + ".phf.asset";
             _PHFontDescs.Add(phdesc);
         }
     }
     foreach (var phpath in _PHFonts)
     {
         var deps = AssetDatabase.GetDependencies(phpath);
         if (deps != null)
         {
             for (int i = 0; i < deps.Length; ++i)
             {
                 var dep = deps[i];
                 if (!_PHFonts.Contains(dep))
                 {
                     _ReplacementFonts.Add(dep);
                 }
             }
         }
     }
     _ReplacementDescs.UnionWith(CapsPHFontEditor._FontReplacementDescs.Keys);
 }
Ejemplo n.º 2
0
 public void Cleanup()
 {
     _PHFonts.Clear();
     _PHFontDescs.Clear();
     _ReplacementFonts.Clear();
     _ReplacementDescs.Clear();
     CapsPHFontEditor.ReplaceRuntimePHFonts();
 }