Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Bug Font Asset Creator: cannot create Font Asset if source Font file is in a package. Version 3.0.8

Discussion in 'UGUI & TextMesh Pro' started by sasoferk, Apr 18, 2024.

  1. sasoferk


    Jul 28, 2020
    The Font Asset Creator window in 3.0.8 currently does not support creating a Font Asset if the Font file itself is located in a package.

    The only problem seems to be in TMPro_FontAssetCreatorWindow.cs line 692:
    errorCode = FontEngine.LoadFontFace(fontPath);

    The issue is that FontEngine.LoadFontFace(path) wants a relative path and this apparently does not work for packages.

    The simple fix is to just use the override of FontEngine.LoadFontFace(path) that uses the Font object instead of the path:
    errorCode = FontEngine.LoadFontFace((Font)m_SourceFontFile);

    This issue seems to be fixed in the 3.2.0 preview versions but as they are in preview and there seems to be no release date in sight it would be really appreciated if a hotfix version could be provided.

    Whoever would be able to make this request/wish come true would have my eternal gratitude and appreciation.
    Last edited: Apr 19, 2024