You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Unity导入Photon Pun 2后出现Failed to find entry-points错误求助

Unity修改脚本触发Photon Pun 2 "Failed to find entry-points" 错误的解决方法

错误核心原因

从报错信息可以定位,问题出在Burst编译器无法解析Photon依赖的Photon3Unity3D, Version=4.1.6.17程序集,导致每次修改脚本触发编译时抛出"Failed to find entry-points"异常。

解决步骤

  • 重新安装Photon Pun 2,确保依赖完整
    打开Unity Package Manager,找到Photon Pun 2,点击Reinstall按钮重新安装,确保所有关联组件(包括Photon3Unity3D.dll)都被正确导入到项目中。安装完成后检查Assets/Photon/PhotonUnityNetworking/Plugins目录下是否存在该dll文件,且版本与报错中的4.1.6.17匹配。

  • 清除Burst编译缓存

    1. 顶部菜单进入Edit > Preferences > Burst
    2. 点击Clear Compiled Libraries按钮清除缓存
    3. 关闭并重启Unity项目
      也可以手动删除项目根目录下的Library/BurstCache文件夹,再重启Unity。
  • 配置Burst跳过Photon程序集编译(临时方案)
    在Assets/Photon/PhotonUnityNetworking目录下新建link.xml文件,写入以下内容:

    <linker>
      <assembly fullname="PhotonUnityNetworking" ignoreBurstCompiler="true" />
      <assembly fullname="Photon3Unity3D" ignoreBurstCompiler="true" />
    </linker>
    

    该配置会让Burst编译器跳过处理Photon相关的程序集,直接绕过解析错误。

  • 验证版本兼容性
    确认当前Unity版本与使用的Photon Pun 2版本官方兼容,比如Unity 2020 LTS及以上版本搭配最新版Photon Pun 2,避免因版本不匹配导致的依赖缺失问题。

内容的提问来源于stack exchange,提问作者Raj

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.28 12:35:30