public static void RebuildAllFont() { string dataPath = Application.dataPath; int startPos = dataPath.Length - "Assets".Length; string[] files = Directory.GetFiles(Application.dataPath, "*.fnt", SearchOption.AllDirectories); for (int i = 0; i < files.Length; i++) { BFImporter.DoImportBitmapFont(files[i].Substring(startPos)); } }
public static bool CheckRebuildFont() { if (EditorApplication.isPlaying) { return(false); } TextAsset selected = Selection.activeObject as TextAsset; if (selected == null) { return(false); } return(BFImporter.IsFnt(AssetDatabase.GetAssetPath(selected))); }
public static void RebuildFont() { TextAsset selected = Selection.activeObject as TextAsset; BFImporter.DoImportBitmapFont(AssetDatabase.GetAssetPath(selected)); }