public static int frameCount ;

설명

The total number of frames that have passed (Read Only).

using UnityEngine;

public class Example : MonoBehaviour { // Makes sure that RecalculateValue only performs // some operations once per frame and no more. static private int lastRecalculation = -1;

static void RecalculateValue() { if (lastRecalculation == Time.frameCount) return; // ProcessData.AndDoSomeCalculations(); } }

Note: frameCount starts once all Awake functions have finished. The frameCount value will be undefined during Awake functions.