Skip to content

Instantly share code, notes, and snippets.

@nicloay
Created October 10, 2018 12:07
Show Gist options
  • Save nicloay/a927e39e84c94442638c4d30cd0ccf45 to your computer and use it in GitHub Desktop.
Save nicloay/a927e39e84c94442638c4d30cd0ccf45 to your computer and use it in GitHub Desktop.
using UnityEngine;
using UnityEngine.UI;
public class FrameCounter : MonoBehaviour
{
private Text _text;
void Awake()
{
_text = GetComponent<Text>();
}
void Update ()
{
_text.text = "" + Time.frameCount;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment