UserSetting Property to detect if MicroProfiler is open

It is impossible to dynamically adjust my game’s UI based on the Microprofiler being open. Currently, when debugging with the Microprofiler, it obscures any UI elements at the top, which means I have to close it to interact with those elements.

Right now I am forced to use RunService:IsStudio() to make the assumption that the Microprofiler is open or add a setting somewhere to force this behavior. A UserSetting property + an accompanying event would be a great QoL feature.

There’s a similar feature for Corescripts which was added in version 342

UserSettings():GetService("GameSettings").OnScreenProfilerEnabled

However due to its security context we can’t currently use this.

image

@kylepo99

1 Like

Do you feel like you should have to adjust your scripts in order to get them to work with the microprofiler? It seems to me like a better solution for everyone would be to shrink the viewport size, or adjust the topbar height, or something like that in order to fit everything. That way you would need no code.

4 Likes

If by changing the viewport size you’re referring to the top bar insert being positioned under the microprofiler by shrinking the viewport size, then yes, that could definitely work. It’s a much better solution if it’s feasible. I didn’t propose it at first because I thought using a user setting/property would be the simplest route to implement this feature.

5 Likes