I’m trying to determine the frame rate of my game - I open a new project with nothing but the default 3d scene (Main Camera + Direction Light) and hit play - the frame rate in stats window bounces between 68 and 70 fps.
This script (which I want to use in order to see the fps on the actual Android device) says the frame rate is consistently @ 59 fps
using UnityEngine;
using System.Collections;
public class TestFPS : MonoBehaviour
{
private int FramesPerSec;
private float frequency = 1.0f;
private string fps;
void Start()
{
StartCoroutine(FPS());
}
private IEnumerator FPS()
{
for (;;)
{
// Capture frame-per-second
int lastFrameCount = Time.frameCount;
float lastTime = Time.realtimeSinceStartup;
yield return new WaitForSeconds(frequency);
float timeSpan = Time.realtimeSinceStartup - lastTime;
int frameCount = Time.frameCount - lastFrameCount;
// Display it
fps = string.Format("FPS: {0}", (frameCount / timeSpan));
}
}
void OnGUI()
{
GUI.Label(new Rect(Screen.width - 100, 10, 150, 20), fps);
}
}
a) I’m wondering why the fps is so low with nothing in the scene?
b) why are the frame rates off by so much?
c) anyone suggest another method for testing fps on android devices?
Thanks for any help