ソースコード
使用例
using Kogane; using System.Collections; using UnityEngine; public class Example : MonoBehaviour { private void Update() { if ( Input.GetKeyDown( KeyCode.Space ) ) { StartCoroutine( Hoge() ); } } private IEnumerator Hoge() { using ( new TargetFrameRateScope( 30 ) ) { yield return new WaitForSeconds( 3 ); } } private void OnGUI() { GUILayout.Label( Application.targetFrameRate.ToString() ); } }