{"id":4680,"date":"2023-02-23T17:13:17","date_gmt":"2023-02-23T09:13:17","guid":{"rendered":"http:\/\/blog.coolcoding.cn\/?p=4680"},"modified":"2023-02-23T21:07:28","modified_gmt":"2023-02-23T13:07:28","slug":"unity2021-atlas%e4%bd%bf%e7%94%a8%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a1%b9","status":"publish","type":"post","link":"https:\/\/blog.coolcoding.cn\/?p=4680","title":{"rendered":"Unity2021 Atlas\u4f7f\u7528\u6ce8\u610f\u4e8b\u9879"},"content":{"rendered":"\n<p>\u4e00\u3001\u9700\u8981\u5b89\u88c5&#8221;2D Sprite&#8221;\u5305<br>\u5728Package Manager\u4e2d\u9009\u62e9 &#8220;2D Sprite&#8221;\u5e76\u5b89\u88c5<\/p>\n\n\n\n<p>\u4e8c\u3001Unity2021\u53d6\u6d88\u4e86Packing Tag<\/p>\n\n\n\n<p>\u4e09\u3001\u56fe\u96c6\u6587\u4ef6\u4ee5\u53caSprite\u8bbe\u7f6e<\/p>\n\n\n\n<p>\u7ecf\u5b9e\u9a8c\u6d4b\u8bd5\uff1a<\/p>\n\n\n\n<p>1\u3001\u82e5Sprite\u672a\u5f52\u5c5e\u4e8e\u4efb\u4f55\u56fe\u96c6(spriteatlas)\uff0c\u5219\u6253\u51fa\u7684AB\u5305\uff0c\u4f1a\u51fa\u73b0\u53cc\u4efd\u7eb9\u7406\uff08Sprite+Texture2D\uff09\u3010\u4e25\u91cd\u3011\uff1b<\/p>\n\n\n\n<p>2\u3001spriteatlas\u6587\u4ef6\uff0c\u4ec5\u7528\u4e8e\u6307\u793aUnity\u7f16\u8f91\u5668\u5982\u4f55\u6253\u5305\uff0cRuntime\u4e0d\u4f7f\u7528\uff0c\u4e0d\u9700\u8981\u6253\u5305\uff0c\u53ef\u4ee5\u653e\u7f6e\u4e8e\u4efb\u610f\u4f4d\u7f6e\uff1b<\/p>\n\n\n\n<p>3\u3001\u5728Project Settings \/ Editor \/ Sprite Packer \/ Mode \u4e2d\uff0c\u8bb0\u5f97\u4e0d\u8981\u9009\u62e9Disable\uff1b<\/p>\n\n\n\n<ul><li> Sprite Atlas V1 &#8211; Enable For Builds \uff08\u63a8\u8350 &#8211; \u4ec5\u5728\u51fa\u5305\u65f6\u6253\u56fe\u96c6\uff0c\u7f16\u8f91\u5668\u6a21\u5f0f\u4e0b\u4e0d\u6253\u56fe\u96c6<\/li><\/ul>\n\n\n\n<ul><li>Sprite Atlas V1 &#8211; Always Enable \uff08\u4e0d\u63a8\u8350 &#8211; \u4e0d\u63a8\u6253\u5305\u8fd8\u662f\u5f00\u53d1\uff0c\u5747\u6253\u56fe\u96c6\uff0c\u4f1a\u5bfc\u81f4\u5f00\u53d1\u65f6\u5361\uff0c\u4ec5\u5728\u7f16\u8f91\u5668\u6a21\u5f0f\u4e0b\u9700\u8981\u8fdb\u884c\u6027\u80fd\u5256\u6790\u65f6\u53ef\u4ee5\u8003\u8651\u6253\u5f00\uff09<\/li><\/ul>\n\n\n\n<ul><li>Sprite Atlas V2 (Experimental) &#8211; Enable \uff08\u4e0d\u63a8\u8350\uff0cV2\u4e0d\u517c\u5bb9V1\u56fe\u96c6\uff0c\u800c\u4e14\u5c5e\u4e8e\u5b9e\u9a8c\u9636\u6bb5\uff09<\/li><\/ul>\n\n\n\n<p>\u56db\u3001Untiy\u7f16\u8f91\u5668\u6253\u56fe\u96c6\u7684\u5751<\/p>\n\n\n\n<p>1\u3001\u5982\u679c\u5df2\u7ecf\u6253\u8fc7Assetbundle\u4e86\uff0c\u7531\u4e8eAssetbundle\u7684\u7f13\u5b58\u673a\u5236\uff0c\u4fee\u6539  Sprite Packer \/ Mode \u662f\u65e0\u6548\u7684\uff08Unity\u7684Bug\uff09\uff0c\u6240\u4ee5\u9700\u8981\u628a\u8001\u7684AssetBundle\u6587\u4ef6\u5168\u90e8\u5220\u6389\uff0c\u91cd\u65b0\u6784\u5efa\u624d\u884c\uff01<\/p>\n\n\n\n<p>2\u3001\u5728\u6253SpriteAtlas\u65f6\uff0c\u5728Inspector-Packing\u52fe\u9009AllowRotation\uff0c\u53ef\u4ee5\u8ba9Sprite\u65cb\u8f6c\uff0c\u4ee5\u8282\u7701\u7a7a\u95f4\u3002\u4f46\u662f\u5728\u4f7f\u7528Image\u65f6\uff0c\u9700\u8981\u52fe\u9009\u201cUse Sprite Mesh\u201d\u9009\u9879\uff0c\u5426\u5219\u56fe\u7247\u6709\u53ef\u80fd\u4f1a\u51fa\u73b0\u65cb\u8f6c\u7684\uff01<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u9700\u8981\u5b89\u88c5&#8221;2D Sprite&#8221;\u5305\u5728Package Manager\u4e2d\u9009\u62e9 &#038;#822 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/4680"}],"collection":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4680"}],"version-history":[{"count":4,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/4680\/revisions"}],"predecessor-version":[{"id":4684,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/4680\/revisions\/4684"}],"wp:attachment":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}