
[ad_1]
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It only takes a minute to sign up.
Anybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
Asked
Viewed
9 times
I have an Unity app that requires a stable fps in editor. The fps itself is really high anywhere from 200 to 280 the problem is that is not consistent. I tried to limit it with the code belove but it still goes up and down too much. So it is not a problem of how high it is but how stable it is. I did not test it in the build because I don’t need to build this application I need it to work in editor.
using UnityEngine;
[ExecuteInEditMode]
public class FrameRateLimiter : MonoBehaviour
{
[SerializeField] private int _target = 240;
private void Start()
{
QualitySettings.vSyncCount = 0;
}
private void Update()
{
if (Application.targetFrameRate != _target)
Application.targetFrameRate = _target;
}
}
\$\endgroup\$
You must log in to answer this question.
lang-cs
[ad_2]