首页 > 编程语言 > 详细

unity报错"Could not produce class with id"

时间:2021-01-28 17:49:47      阅读:61      评论:0      收藏:0      [点我收藏+]

Unity打的Android包报错,给出的提示是

This could be caused by a class being stripped from the build even though it is needed. Try disabling ‘Strip Engine Code‘ in Player Settings.

建议禁用剔除引擎代码

如果不想禁用,还有一个方案,就是告诉Unity不要剔除指定的类

  1. 到 https://docs.unity3d.com/Manual/ClassIDReference.html 找到报错提示中id对应的类,例如(id 258)对应的是LightProbes
  2. 在Assets目录添加文件link.xml
  3. <linker>
        <assembly fullname="UnityEngine">
            <type fullname="UnityEngine.LightProbes" preserve="all"/>
        </assembly>
    </linker>
    

    填入上述内容

unity报错"Could not produce class with id"

原文:https://www.cnblogs.com/z-cmos/p/14339471.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!