I use Unity 2021.2.11.
I’ve made a simple demo to demonstrate:
2 standard buttons, and 2 containers: one with text(with default settings) and the other with image.
For buttons I use .uss for fonts:
1st button is trying to load Font Asset:
-unity-font-definition: resource("Assets/UI/fonts/Roboto/Roboto-Regular SDF.asset");
2nd button is using .ttf directly:
-unity-font: resource("Assets/UI/fonts/Roboto/Roboto-Regular.ttf");
This is how it looks like in game mode in editor:
On my phone (OnePlus One, Android 11 LineageOS):
Is there any way to solve this issue?
Hi @qwerty_25634 !
Could you share the player logs ? This could be helpful to find the root cause of the issue.
At first glance, I would verify if the resources you are using are being transferred to the build player successfully. For an asset to be transferred successfully, it has to be either referenced in the scene explicitly, or it has to be in a “Resources/” folder. Could you try moving your resources to a “Ressources/” folder to see if that helps?
Hello! The resource()
reference to assets works for files located under the Resources folder, so it’s not even supposed to be working like that in the Game View. I’m wondering if it’s falling back to a default value and warning on your Console View, so you may have missed it?
In any case, can you either use the url()
reference to the assets, or move them to the Resources folder, and give it a go? You can read more about asset references here: Unity - Manual: USS Properties types (scroll down to the session called “Assets”).
Let us know how it goes! 
1 Like