Make UI unaffected by game lag?

Using UI Toolkit on a fresh install of Unity 6000.0.39f1 in a brand new HDRP project, on MacOS.

I’d like to know if there’s a way to separate the UI from the rest of the logic probably in two threads such that even if the game is lagging, the UI still runs smoothly, as UI is top priority in my game. Thanks.

Not in Unity, at least not today. Everything happens on one thread as far as scripting land goes when transacting against the UnityEngine API.

Notes on optimizing UnityEngine.UI setups:

Do you currently experience lag? If so, you should run the Profiler and find ways to optimize.

Dynamically adjusting the quality level based on the current average framerate would be the most viable solution if you can’t fully control scenarious where the rendering takes a nosedive, for instance if we’re talking sandbox building where interaction with a complex UI is essential and costly operations (ie flood fill, user creating crazy complex designs) are common.