Version: 5.3 (switch to 5.4b)
言語English
  • C#
  • JS

スクリプト言語

好きな言語を選択してください。選択した言語でスクリプトコードが表示されます。

Time.frameCount

マニュアルに切り替える
public static int frameCount;

説明

経過したフレーム数の合計(Read Only)

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { private static int lastRecalculation = -1; static void RecalculateValue() { if (lastRecalculation == Time.frameCount) return; } }

注: すべての Awake 関数がいったん完了してから frameCount は開始します。 Awake 関数の実行中は frameCount 値は定義できません。