[ad_1]
Recreation Growth Stack Trade is a query and reply web site for skilled and impartial recreation builders. It solely takes a minute to enroll.
Anyone can ask a query
Anyone can reply
One of the best solutions are voted up and rise to the highest
Requested
Considered
15 instances
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.
lang-cs
[ad_2]