Search Issue Tracker

Won't Fix

Votes

0

Found in

2017.4

2018.4.16f1

2020.2

Issue ID

1223100

Regression

No

[WebGL] WaitForSeconds takes longer than expected when Application.targetFrameRate is set to 1

WebGL

-

Reproduction steps:
1. Open the attached project ("case_1223100-WaitForSecondsWebGL.zip")
2. Open the repro scene ("SampleScene")
3. Switch the build target to WebGL
4. Build and run the build
5. Open developer's console
6. Notice the "Before WaitForSeconds" log
7. Wait and measure approximately how long it takes for "After WaitForSeconds" log to appear

Expected result: "After WaitForSeconds" log appears after ~5 seconds
Actual result: "After WaitForSeconds" log appears after ~15-30 seconds

Reproduces on: 2017.4.37f1, 2018.4.18f1, 2019.3.4f1, 2020.1.0b1, 2020.2.0a2

Notes:
1. The issue doesn't reproduce on (Windows10) Standalone builds (tested both Mono and IL2CPP scripting backend)
2. Tested with Firefox (73.0.1) Chrome (80.0.3987.132), Edge (44.18362.449.0)

  1. Resolution Note (2020.1.X):

    We could choose a value >= 3 for targetFrameRate or use WaitForSecondsRealtime() instead of WaitForSeconds() or increase the Time.maximumTime in project setting from current value 0.3 to 1.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.