Question by
Wolf_sk1 · Jun 16, 2020 at 07:55 AM ·
androidframe rate
Screen.currentResolution.refreshRate maybe not retutn the right value.,
ROG Phone2,i set the screen refresh rate to 120hz(in setting).
then open the demo apk.
void OnGUI()
{
int w = Screen.width, h = Screen.height;
GUIStyle style = new GUIStyle();
Rect rect = new Rect(0, 0, w, h * 2 / 100);
style.alignment = TextAnchor.UpperLeft;
style.fontSize = h * 2 / 100;
//new Color (0.0f, 0.0f, 0.5f, 1.0f);
style.normal.textColor = Color.white;
float msec = deltaTime * 1000.0f;
float fps = 1.0f / deltaTime;
string text = string.Format("{0:0.0} ms ({1:0.} fps),ScreenFrame:{2}", msec, fps,Screen.currentResolution.refreshRate);
GUI.Label(rect, text, style);
}
it`s still show ScreenFrame:60.
even though i set the Application.targetFrameRate = 120.
the fps ≈ 120,but the ScreenFrame still show 60.
anything wrong?
,
Comment
Your answer
Follow this Question
Related Questions
Android build installs without an icon in the app drawer 2 Answers
Keep a file from assets after build 0 Answers
Why is IAP service not working when uploading aab to google play? 0 Answers
Plugin with id "com.android.application" not found. Gradle Build Failed 1 Answer
Unity Android app crashes on Xgimi TV at UnityLogWriter:Init 1 Answer