文档

支持

“项目无法识别”错误

Resolve unrecognized project errors in Unity Build Automation and configure project paths correctly.
阅读时间1 分钟最后更新于 19 天前

症状

构建失败并出现以下错误:
[error] Error: unrecognized project! Please check your app configuration - if this is a Unity application, We expect your "Project Subdirectory" to be set to the path which directly contains the ProjectSettings and Assets directories. For a native app, this should be set to the path which directly contains the project file (.xcodeproj, project.properties, etc).

原因

Unity Build Automation 仅支持对 Unity 项目进行构建。出现此错误的最常见原因是
ProjectSettings
Assets
文件夹位于源代码仓库或代码仓库中 Unity Build Automation 所指定目标文件夹的子目录内。

解决方案

如果您的项目是 Unity 项目,但位于子目录中,则可以创建新的目标,并定义项目子目录路径的名称。这会告知 Unity Build Automation 在该子目录中查找需要构建的项目。 要在 Unity Dashboard 中更改目标,请执行以下操作:
  1. 选择 Build Automation > Configurations(配置)
  2. 选择要编辑的构建上的 Edit(编辑)按钮。
  3. Basic settings(基本设置) 选项卡中编辑目标。
"UBA - 项目子目录"

UBA - 项目子目录

其他资源