unity 发布WebGL版本找不到unity自带的类

Posted 福建小屁孩

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了unity 发布WebGL版本找不到unity自带的类相关的知识,希望对你有一定的参考价值。

 加载asset bundle的时候出现Could not produce class with ID XXX的错误

在asset 文件夹下建一个Link的XML,内容如下:

<?xml version="1.0" encoding="utf-8"?>
<linker>
<assembly fullname="UnityEngine">
<type fullname="UnityEngine.SphereCollider" preserve="all"/>
<type fullname="UnityEngine.Audiosources" preserve="all"/>
<type fullname="UnityEngine.ReflectionProbe" preserve="all"/>
<type fullname="UnityEngine.Avatar" preserve="all"/>
<type fullname="UnityEngine.Animator" preserve="all"/>
<type fullname="UnityEngine.PhysicMaterial" preserve="all"/>
<type fullname="UnityEngine.CapsuleCollider" preserve="all"/>
</assembly>
<assembly fullname="System">
<type fullname="System.Exception" preserve="all"/>
</assembly>
</linker>

 

在这个网站https://docs.unity3d.com/Manual/ClassIDReference.htm上l根据ClassID找到对应的脚本















以上是关于unity 发布WebGL版本找不到unity自带的类的主要内容,如果未能解决你的问题,请参考以下文章

无法在 Unity 中构建 WebGL

Unity的WebGL发布在IIS上并加载资源的若干问题

我尝试在 unity-webGL 中构建我的游戏,但出现错误

[Unity转小游戏]微信开发者工具/微信小游戏中找不到unityInstance.(unityInstance is not defined)

unitywebgl允许http没有响应

Unity 5.3 中WebGL的更新