How to keep menu interactable during framerate drop

I’m working on an evolution simulator project right now that can sometimes get quite computationally intensive, especially as the creatures in the simulation can multiply exponentially. To help deal with this, I’ve created a slider that controls Time.timeScale, so that if I notice the framerate dropping too low, I can drop the timeScale to save it from freezing up completely. However, if I’m too slow, I can sometimes miss my chance and end up with extremely low framerates to the point that the simulation becomes totally uninteractable.

My question is if there is any way to prioritize the GUI slider (and other menu items in general) over the physics simulation so that even if the simulation itself gets extremely laggy, the slider is still usable. Any help would be appreciated! Thanks!

There is not unfortunately.

What you could do constantly check the currently framerate via Time.deltaTime, and if it’s below a certain threshold, automatically adjust the timescale.

That way you can have a dynamically adjusting timescale and keep things relatively smooth.