-
Notifications
You must be signed in to change notification settings - Fork 0
Build Item zh CN
QiuHanWen edited this page Mar 22, 2024
·
3 revisions
当你完成Item编辑后,可以尝试打包。开始之前,你应该确保Item Manager
窗口中该Item必要的信息都设置正确。
点击Item Manager
窗口中的Build
按钮,打包后的内容将存储在[项目根目录]/Export/Items
目录下的一个与Item同名的文件夹中。
如果打包过程中出现警告/错误,请查看Console
窗口以了解更多信息。
Console窗口出现以下错误:‘Can't build custom scripts with warning: The C# source file 'XXX.cs' exists in the Unity project but not in the .csproj file and will not be compiled. You may need to regenerate the script project file/Script compilation will be skipped. No source files were specified! Possible Reason: The script editor failed to generate the correct csproject.’
解决方案:确保PackagesManager
窗口包含唯一的脚本编辑器,并且与Preferences
窗口-External Tools中的设置一致(如VisualStudio):
注意:
- 在打包时Item文件夹中的场景或Prefab文件会被临时修改,这时如果因为特殊原因导致打包失败,这类文件会无法还原,所以请注意在打包前做好备份。
- 因为AssetBundle的限制,Item文件夹中的场景不能有重名,否则打包会出错。