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

Unity AR模板项目构建成功但运行黑屏问题求助

Unity AR项目构建后全黑屏问题求助

原本为解决旧项目问题,我将Unity升级至2023最新版本,结果反而陷入困境。用Unity AR模板新建项目后初期一切正常,复制旧项目的两个简单脚本后执行构建并运行,构建成功完成,但打开应用后直接全黑屏,连Unity启动画面都看不到。

构建完成后控制台输出如下:

Warning: The package cache was invalidated and rebuilt because the following immutable asset(s) were unexpectedly altered:
Packages/com.unity.xr.arkit/Tests/Editor/Assets/TestReferenceImageLibrary.asset
Packages/com.unity.xr.arcore/Tests/Editor/Assets/TestReferenceImageLibrary.asset

Warning: Import Error Code:(4)
Message: Build asset version error: packages/com.unity.xr.arkit/tests/editor/assets/testreferenceimagelibrary.asset in SourceAssetDB has modification time of '2023-08-24T10:47:54.9559554Z' while content on disk has modification time of '2023-07-26T19:20:34Z'

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Warning: A meta data file (.meta) exists but its folder 'Packages/com.unity.xr.magicleap/Runtime/Plugins' can't be found, and has been created. Empty directories cannot be stored in version control, so it's assumed that the meta data file is for an empty directory in version control. When moving or deleting folders outside of Unity, please ensure that the corresponding .meta file is moved or deleted along with it.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Message: Android manifest path = D:\Unity Games\ARFoundationGame\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\AndroidManifest.xml
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Message: Application installed to device "2a2268a435027ece [SM-G960F]".
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Message: Build completed with a result of 'Succeeded' in 68 seconds (67706 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

我推测问题出在AR插件上:空白3D项目构建正常,但添加AR插件后会出现与.meta文件相关的报错,移除并重新安装插件后报错消失,但黑屏问题依旧存在。

已尝试的解决方法:

  • 删除项目重新创建
  • 重新安装Unity 2023版本
  • 回退至Unity 2022版本
  • 重新安装Unity Hub
  • 构建空白Unity AR模板项目(仍黑屏)
  • 使用补丁替换完整构建
  • 更换USB数据线(旧数据线存在随机断开连接问题)

所有方法都无效,急需技术帮助。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.12 10:42:55