Skip to content

Commit 71f528e

Browse files
committed
Fix issue with long frame causing Unity to switch to setTimeout from rAF
1 parent 66ef62b commit 71f528e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Packages/webxr/Runtime/Plugins/WebGL/webxr.jspre

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,9 @@ void main()
666666
return thisXRMananger.xrSession.requestAnimationFrame(function (time, xrFrame) {
667667
thisXRMananger.animate(xrFrame);
668668
func(time);
669+
if (thisXRMananger.BrowserObject.mainLoop.timingMode == 0) {
670+
_emscripten_set_main_loop_timing(1, 1);
671+
}
669672
});
670673
} else {
671674
window.requestAnimationFrame(func);

0 commit comments

Comments
 (0)