$begingroup$

I’ve an Unity app that requires a steady fps in editor. The fps itself is basically excessive anyplace from 200 to 280 the issue is that’s not constant. I attempted to restrict it with the code belove however it nonetheless goes up and down an excessive amount of. So it’s not an issue of how excessive it’s however how steady it’s. I didn’t take a look at it within the construct as a result of I needn’t construct this software I would like it to work in editor.

    utilizing UnityEngine;

[ExecuteInEditMode]
public class FrameRateLimiter : MonoBehaviour
{
    [SerializeField] non-public int _target = 240;

    non-public void Begin()
    {
        QualitySettings.vSyncCount = 0;
    }

    non-public void Replace()
    {
        if (Utility.targetFrameRate != _target)
            Utility.targetFrameRate = _target;
    }
}

$endgroup$

5

You will need to log in to reply this query.