Legacy Documentation: Version 5.2
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Time.frameCount

Switch to Manual
public static int frameCount;

Description

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

using UnityEngine;
using System.Collections;

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