Last active
January 9, 2019 09:26
-
-
Save Noxalus/b2042220afdb20269ab3c650fb9352c0 to your computer and use it in GitHub Desktop.
A Unity component to force max FPS to a specific value
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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