Fix global fps not respecting show fps setting properly
This commit is contained in:
@@ -22,7 +22,13 @@ public class GlobalFPSText : MonoBehaviour
|
|||||||
|
|
||||||
void Update()
|
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++;
|
frames++;
|
||||||
timer += Time.unscaledDeltaTime;
|
timer += Time.unscaledDeltaTime;
|
||||||
if (timer >= 0.25f)
|
if (timer >= 0.25f)
|
||||||
|
|||||||
Reference in New Issue
Block a user