Skip to content

Instantly share code, notes, and snippets.

View freemanlam's full-sized avatar

Freeman Lam freemanlam

View GitHub Profile
@freemanlam
freemanlam / ShowFPS.cs
Created May 15, 2015 06:30
Show FPS in Unity
using UnityEngine;
using System.Collections;
public class ShowFPS : MonoBehaviour
{
const float fpsMeasurePeriod = 0.5f;
private int m_FpsAccumulator = 0;
private float m_FpsNextPeriod = 0;
private int m_CurrentFps;