経過したフレーム数を取得する方法を自分用にメモ。
[ 取得方法 ]
「Time.frameCount」で取得できます。
[ 使用例 ]
下記はコンソールに経過したフレーム数を毎フレーム出力するスクリプトです。
using System.Collections; using System.Collections.Generic; using UnityEngine; public class ScriptTest : MonoBehaviour { void Update() { Debug.Log(Time.frameCount); } }