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