using System.Collections; using System.Collections.Generic; using UnityEngine; /// /// Simple MonoBehaviour to set the Application's targetFrameRate /// public class SetTargetFramerate : MonoBehaviour { [SerializeField] [Tooltip("Sets the application's target frame rate.")] int m_TargetFrameRate = 60; /// /// Get or set the application's target frame rate. /// public int targetFrameRate { get { return m_TargetFrameRate; } set { m_TargetFrameRate = value; SetFrameRate(); } } void SetFrameRate() { Application.targetFrameRate = targetFrameRate; } void Start() { SetFrameRate(); } }