UI Toolkit and Builder scaling issues when building for Android

Hi, I’m having some trouble with scaling elements in UI Toolkit when building for android.
If I set a size of an element in pixels then the elements appear too big once I’ve built the game onto my device.

I’m using Unity 2020.3.11f1 and a Samsung Galaxy S20+ with both the UI Builder and UI Toolkit packages in version 1.0.0-preview.14.

My steps are, in order, as follows;

  1. Create new 2D project using 2020.3.11f1 (LTS).
  2. Switch build platform to Android, keeping default settings.
  3. Add the UI Toolkit and UI Builder packages.
  4. Create a new UIDocument Gameobject.
  5. Change the Remote Device settings to use any android device, PNG compression and normal resolution, and run the latest version of Unity remote on my device.
  6. Open the UI Builder window, toggle ‘Match Game View’ to match my remote device and change the Game View’s Aspect Ratio to ‘Remote’.
  7. Add a new Label in the UI Builder, align the text to center and increase the font size to 50px.
  8. Save the file as Test.uxml and apply it to the UIDocument Gameobject.

When I run the game this is what I get…

When I build the game, this I what I get instead…

Everything gets scaled up and I’m not sure why, this doesn’t just happen to text, but seemingly any element that is assigned a size in pixels rather than percentage.

Any idea what the issue might be?

In the PanelSettings asset of your UIDocument, set “Scale Mode” to “Constant Pixel Size”.