UnityEditor.TrueTypeFontImporter.GenerateEditableFont C# (CSharp) Method

GenerateEditableFont() private method

private GenerateEditableFont ( string path ) : Font
path string
return UnityEngine.Font
        public extern Font GenerateEditableFont(string path);
        [MethodImpl(MethodImplOptions.InternalCall)]

Usage Example

        private static void CreateEditableCopy(MenuCommand command)
        {
            TrueTypeFontImporter trueTypeFontImporter = command.context as TrueTypeFontImporter;

            if (trueTypeFontImporter.fontTextureCase == FontTextureCase.Dynamic)
            {
                EditorUtility.DisplayDialog("Cannot generate editabled font asset for dynamic fonts", "Please reimport the font in a different mode.", "Ok");
                return;
            }
            string str = Path.GetDirectoryName(trueTypeFontImporter.assetPath) + "/" + Path.GetFileNameWithoutExtension(trueTypeFontImporter.assetPath);

            EditorGUIUtility.PingObject(trueTypeFontImporter.GenerateEditableFont(TrueTypeFontImporterInspector.GetUniquePath(str + "_copy", "fontsettings")));
        }
All Usage Examples Of UnityEditor.TrueTypeFontImporter::GenerateEditableFont