Skip to content
QiuHanWen edited this page Mar 24, 2023 · 1 revision

当你完成项目场景的编辑后,可以尝试将项目构建到mod文件中。开始之前,你应该确保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): image