static void RegenerateFontAsset(MenuCommand command) { FontAsset fontAsset = command.context as FontAsset; if (fontAsset != null) { FontAssetCreatorWindow.ShowFontAtlasCreatorWindow(fontAsset); } }
static void CreateFontAsset(MenuCommand command) { TrueTypeFontImporter importer = command.context as TrueTypeFontImporter; if (importer != null) { Font sourceFontFile = AssetDatabase.LoadAssetAtPath <Font>(importer.assetPath); if (sourceFontFile) { FontAssetCreatorWindow.ShowFontAtlasCreatorWindow(sourceFontFile); } } }