Fix global fps not respecting show fps setting properly

This commit is contained in:
2025-09-20 13:45:09 -07:00
parent 8f41451bcb
commit 35533e50e3

View File

@@ -22,7 +22,13 @@ public class GlobalFPSText : MonoBehaviour
void Update()
{
if (!BazookaManager.Instance.GetSettingShowFPS() && text.text != "") text.text = "";
var enabled = BazookaManager.Instance.GetSettingShowFPS();
if (!enabled && text.text != "")
{
text.text = "";
return;
}
else if (!enabled) return;
frames++;
timer += Time.unscaledDeltaTime;
if (timer >= 0.25f)