9

#Unity 2020 H5游戏加载失败

 3 years ago
source link: https://xmanyou.com/unity2020-webgl-unity-framework-not-defined/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
26 February 2021 / Unity

#Unity 2020 H5游戏加载失败

使用Unity 2020,使用默认选项,打包成WebGL游戏,也就是H5游戏,结果游戏启动时报错了,然后卡住了:

Unity2020-WebGL-unityFramework-is-not-defined

Invalid or unexpected token

unityFramework is not defined

经过一番搜索,原来是个bug……

https://forum.unity.com/threads/uncaught-referenceerror-unityframework-is-not-defined-at-htmlscriptelement-script-onload-webgl.803967/

Unity2020-WebGL-unityFramework-is-not-defined-03

解决方法就是打包的时候不要压缩:

Unity2020-WebGL-unityFramework-is-not-defined-02

阿斌

Read more posts by this author.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK