在构建游戏时,Unity 会存储有关资源的大量元数据,例如导入设置、其他资源的链接以及其他信息。如果要将资源转移到其他项目并保留所有此类信息,可采用__自定义资源包__形式导出资源。
请参阅资源包以了解关于使用(包括导入和导出)__资源包__的详细信息。
使用 Export Package 可创建您自己的__自定义资源包__。
提示:导出资源包时,Unity 也可以导出所有依赖项。 因此,例如,如果选择一个场景并导出包含所有依赖项的资源包,那么也将导出场景中出现的所有模型、 纹理和其他资源。 这是导出大量资源的快捷方法,无需手动定位所有资源。
有时可能希望更改资源包的内容并创建资源包的更新版本。 为此需要执行以下操作:
选择希望纳入资源包中的资源文件(选择未更改的文件和新文件)。
如上文的导出资源包中所述,导出文件。
注意:可以重命名更新的资源包,而 Unity 会将其识别为更新,因此可以使用增量式命名方式,例如:MyAssetPackageVer1、MyAssetPackageVer2。
提示:不建议从资源包中删除文件,然后使用相同名称来替换这些文件: Unity 会将这些文件识别为不同且可能发生冲突的文件,因此在导入这些文件时会显示警告符号。 如果已删除文件,随后决定恢复此文件,最好给此文件提供一个与原名不同但相关的名称。
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.