Unity打包WebGL 报错 ==》Looks like you are rendering without using requestAnimationFrame for the main loop.

问题

Unity 打包WebGL 网页测试 报错

Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!

image


报错翻译

看起来你是渲染没有使用requestAnimationFrame的主循环。为了使用requestAnimationFrame,你应该使用0作为emscripten_set_main_loop中的帧率,因为这可以极大地提高你的帧率!

分析

环境

Unity:2020.3.15

打包环境:WEBGL

解决方法

删除 Application.targetFrameRate = 60;

总结

posted @ 2025-06-17 11:44  星空探险家  阅读(71)  评论(0)    收藏  举报