How to limit framerate to 60 FPS in WebGL

Hello community,

I know this is a common issue for many Unity developers, WebGL wont respect Application.targetFramerate

My game must run at 60 FPS for specific reasons that cant change in this moment.

Is there a workaround for this?, i read that it was related to VSYNC and its tied to Resolution and display HZ

In some displays i get 120 FPS, in some 90 fps, and in some 60 fps.

Is this remotely possible?.

1 Like

According to this thread , it will work for pretty much anything that’s not exactly 60 fps. Would it work if your code set the target framerate to 59 or 61?

Read this documentation:

60 fps is enough

I can confirm that adjusting only the ā€˜Application.targetFramerate’ to 61 effectively fixed the issue. Recently, I encountered this problem with a WebGL build, and this adjustment successfully limited the frames without requiring any other changes. The Unity version I used was 2022.3.10f1.

1 Like