{"id":2148,"date":"2020-07-30T17:48:04","date_gmt":"2020-07-30T09:48:04","guid":{"rendered":"http:\/\/blog.coolcoding.cn\/?p=2148"},"modified":"2020-08-07T14:58:51","modified_gmt":"2020-08-07T06:58:51","slug":"bugassetbundle%e6%89%93%e5%8c%85shader%ef%bc%8c%e5%bc%95%e5%8f%91%e5%8f%98%e4%bd%93%e4%b8%a2%e5%a4%b1","status":"publish","type":"post","link":"https:\/\/blog.coolcoding.cn\/?p=2148","title":{"rendered":"[bug]Assetbundle\u6253\u5305shader\uff0c\u5f15\u53d1\u53d8\u4f53\u4e22\u5931\u7684\u89e3\u51b3\u65b9\u6848"},"content":{"rendered":"\n<p>\u4e00\u3001\u73af\u5883\uff1a<br>Assetbundle\u62532\u4e2a\u5305<br>\u5206\u4e3ashader_pkg\u5305\u3001model_pkg\u5305<br><br>\u5176\u4e2d shader_pkg \u5305\u542b\u6709shader\u6587\u4ef6\uff0c\u542b\u6709\u5404\u79cd\u53d8\u4f53<br>model_pkg \u5305\u542b\u6709\u7f8e\u672f\u6a21\u578b\u6587\u4ef6\uff0c\u5f15\u7528\u4e86shader\u7684\u5404\u79cd\u53d8\u4f53<br><br>\u4e8c\u3001\u8868\u73b0\uff1a<br>\u52a0\u8f7dmodel_pkg\u4e2d\u7684\u6a21\u578b\uff0c\u6750\u8d28Keyword\uff08\u53d8\u4f53\uff09\u5168\u90e8\u4e22\u5931\uff0c\u4e0d\u751f\u6548<\/p>\n\n\n\n<p>\u4e09\u3001\u89e3\u51b3\uff1a<br>1\u3001\u5c1d\u8bd5\u628ashader\u6587\u4ef6\u62c9\u5230Always Include\u4e2d\uff0c\u8868\u73b0\u5f02\u5e38<br>2\u3001\u5c1d\u8bd5\u628ashader\u4e0d\u8981\u6253\u5305\uff0c\u8868\u73b0\u6b63\u5e38<br>3\u3001\u5728Graphics\u4e2d\uff0c\u628a\u53d8\u4f53\u53e6\u5b58\u6210preload.shadervariants\u6587\u4ef6,<br>\u628apreload.shadervariants\u6587\u4ef6\u6253\u5230model_pkg\u5305\u4e2d\uff0c\u5e76\u5728\u6e38\u620f\u542f\u52a8\u65f6\uff0c\u52a0\u8f7d\u6b64ShaderVariantCollection\uff0c\u5e76\u6267\u884cWarmUp\uff0c\u8868\u73b0\u5f02\u5e38<br>4\u3001\u628apreload.shadervariants\u6587\u4ef6\u6253\u5230shader_pkg\u5305\u4e2d\uff0c\u8868\u73b0\u6b63\u5e38<\/p>\n\n\n\n<p>\u56db\u3001\u7ed3\u8bba\uff1a<br>shadervariants\u6587\u4ef6\u4e00\u5b9a\u8981\u548cshader\u5305\u653e\u7f6e\u5728\u540c\u4e00\u4e2a\u5305<br>\u731c\u6d4bUnity\u5728\u7f16\u8bd1AssetBundles\u5305\u4e2d\u7684shader\u6587\u4ef6\u65f6\uff0c\u4f1a\u67e5\u627e\u6b64\u5305\u4e2d\u662f\u5426\u6709shadervariants\u6587\u4ef6\uff0c\u82e5\u6709\uff0c\u5219\u5c06\u6307\u5b9a\u7684\u53d8\u4f53\u7f16\u8bd1\u8fdb\u53bb\uff1b<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u73af\u5883\uff1aAssetbundle\u62532\u4e2a\u5305\u5206\u4e3ashader_pkg\u5305\u3001model_pkg\u5305 \u5176\u4e2d shader_ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[18],"_links":{"self":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/2148"}],"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=2148"}],"version-history":[{"count":3,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/2148\/revisions"}],"predecessor-version":[{"id":2160,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/2148\/revisions\/2160"}],"wp:attachment":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}