16 private int frameCount;
17 private int framesPerSecond;
18 private int lastWholeTime;
28 private string GetFps()
33 return string.Format(
"FPS: {0}\n", framesPerSecond);
39 private void UpdateFps()
42 int currentWholeTime = (int) Time.realtimeSinceStartup;
43 if (currentWholeTime != lastWholeTime)
45 lastWholeTime = currentWholeTime;
46 framesPerSecond = frameCount;