Search Unity

Question Build and Invalid font reference

Discussion in 'UI Toolkit' started by Bodyclock, Jan 10, 2021.

  1. Bodyclock

    Bodyclock

    Joined:
    May 8, 2018
    Posts:
    172
    Hi All, having a problem creating a build with UI Toolkit.

    I'm using Addressables to load the UIDocument (Visual Tree Asset). All I have in it is one Visual Element. No USS and just the color changed. Works fine in the editor (in fact I had a much more complex version working in the editor before the problem).

    In the build, it logs an Invalid font reference error and doesn't build the UI, yet I'm not using any fonts. I suspect it may have something to do with either the Addressables or an inbuilt font?

    I note that in UIBuilder, the Visual Element inspector has the Inter font displayed but I can't find any fonts referenced in the UXML or inline styles.

    Any help would be appreciated. Cheers.

    UPDATE : Looks like it has to do with TextCore default font in the text Settings. Anyone know how to get around this, or do I load the Font also?
     
    Last edited: Jan 10, 2021