Skip to content

Instantly share code, notes, and snippets.

@Noxalus
Last active January 9, 2019 09:26
Show Gist options
  • Save Noxalus/b2042220afdb20269ab3c650fb9352c0 to your computer and use it in GitHub Desktop.
Save Noxalus/b2042220afdb20269ab3c650fb9352c0 to your computer and use it in GitHub Desktop.
A Unity component to force max FPS to a specific value
using UnityEngine;
public class TargetFPS : MonoBehaviour
{
[SerializeField] private int _targetFramerateValue = 60;
void Awake()
{
Application.targetFrameRate = _targetFramerateValue;
QualitySettings.vSyncCount = 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment