Performance of UI Toolkit

Is there any performance testing data for UI Toolkit on mobile devices? Such as power consumption, CPU/GPU usage, etc. (These data are not an issue on PC platforms, but are very important on mobile). Compared to native platform UI.

UI Toolkit is now very professional, and if it can match native platform UI, we can leverage the professionalism of UI Toolkit along with Unity’s cross-platform features and powerful rendering capabilities to develop many cross-platform professional applications, which can extend beyond just games.

There was this thread recently where UI Toolkit was rendering slow on a particular older device: UIToolkit rendering is extremely slow on (older?) Android devices

Reason being a lot of work is put on the shader, potentially causing issues for a mobile device. Once we get shader support I imagine there can be mobile specific shaders.

I haven’t seen any hard figures though the devs have mentioned they test on a variety of devices, and that whether it performs better or worse than uGUI will be different depending on what you’re doing. I’ve seen lots of anecdotal mention of great and bad performance from users, so, hard to come to a conclusion on what people are saying.

On my own anecdotal account, I recently acquired a Steam Deck, and testing my UI heavy, UI Toolkit project on it didn’t have any issues. Not quite a typical mobile device, but not quite a PC, of course.

Needless to say, worth doing your own profiling if you can.

1 Like

Haha, thank you for your sharing. As an independent developer, the devices I have may not be able to support obtaining relatively complete data. In addition, due to the nature of game engines, I suspect that compared to the platform’s native UI system, game engines may consume more resources (because they need to refresh every frame). There is little information about UIE on the internet, so I would like to ask if the official team has any relevant data or special optimization suggestions.

1 Like

Hi @stnaw
If you want to get some advice on UIToolkit performance, I highly recommend the Getting the best performance with UI Toolkit | Unite 2024 video.

3 Likes

UI Toolkit has been optimized to prevent breaking batch (changing the material) unlike UGUI. In order to do this, the shader used is an “uber” shader that include logic for text, antialiasing and we are also resolving the texture indirectly (up to 8 separate textures can be used before we need to break the batch, not counting theses can be an atlas).

This is mostly a cpu optimization and is costing very little on the gpu on most platform. But on mobile the fill rate of this more expensive shader is the limiting factor. If you have large background or full screen quad it could be worth exploring doing them with other mean than just adding them in UIToolkit.

We are definitely working toward offering more options for shader that would help with this, (see the roadmap ) but there is no public ETA for the features in development.

6 Likes