- Home /
low fps in empty scene android
Hi all. I have a problem with fps. I have a scene that has NOTHING in it just a main camera, directional light and a 3dtext that shows number of fps by a script. But when i run it in android it shows me sth between 40 fps and 55 fps and it never goes to 60 fps! thanks the script that shows the number of fps is this:
using UnityEngine;
using System.Collections;
public class fps : MonoBehaviour {
public TextMesh myUi;
//Declare these in your class
int m_frameCounter = 0;
float m_timeCounter = 0.0f;
float m_lastFramerate = 0.0f;
public float m_refreshTime = 0.5f;
void Update()
{
myUi.text = m_lastFramerate.ToString ("F2");
if( m_timeCounter < m_refreshTime )
{
m_timeCounter += Time.deltaTime;
m_frameCounter++;
}
else
{
//This code will break if you set your m_refreshTime to 0, which makes no sense.
m_lastFramerate = (float)m_frameCounter/m_timeCounter;
m_frameCounter = 0;
m_timeCounter = 0.0f;
}
}
}
i wonder if anyone can help cause it made me crazy. p.s: I used solid colour for skybox.
Answer by Aily · Feb 26, 2019 at 03:37 PM
Application.targetFrameRate limit https://docs.unity3d.com/ScriptReference/Application-targetFrameRate.html
Your answer

Follow this Question
Related Questions
How can I easily implement performance statistics grabber? 1 Answer
Why is there difference in fps and time to render a frame in statistics window and profiler? 0 Answers
FPS decreases over time in editor (Potential memory leak?) 2 Answers
2d game performance is bad in mobile, but giving 80 to 130 fps in pc, its physics game, help plz 2 Answers