要启用或禁用__精灵图集__的默认打包行为,请打开 Editor 设置(菜单:__Edit > Project Settings > Editor__)并导航到 Sprite Packer > Mode。选择 Sprite Packer Mode 选项以确定 Unity 如何在 Editor 中使用精灵图集。
__Disabled__:在项目中禁用精灵图集打包。当项目进入播放模式或发布构建时,不会构建精灵图集。Pack Preview 也禁用。
Enabled for Builds (Legacy Sprite Packer):选择此模式将启用旧版 Sprite Packer 并禁用精灵图集,因为二者无法同时启用。仅针对发布的构建,Unity 使用旧版 Sprite Packer 将精灵进行打包。Editor 和播放模式引用原始源纹理而非打包图集中的纹理。
Always Enabled (Legacy Sprite Packer):选择此模式将启用旧版 Sprite Packer 并禁用精灵图集,因为二者无法同时启用。Unity 使用旧版 Sprite Packer 将所选纹理打包到图集中,且精灵在运行时将引用打包的纹理。但是,精灵将在编辑模式期间引用原始未打包的纹理。
__Enabled for Builds__:仅针对发布的构建,Unity 将精灵打包到精灵图集中。Editor 和播放模式引用原始源纹理而非精灵图集中的纹理。
__Always Enabled__:默认情况下会启用此选项。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.