{"id":79,"date":"2022-07-18T11:42:32","date_gmt":"2022-07-18T03:42:32","guid":{"rendered":"https:\/\/www.unitybundlemaster.com\/?p=79"},"modified":"2022-07-18T12:19:57","modified_gmt":"2022-07-18T04:19:57","slug":"%e5%ba%8f-%e4%b8%ba%e4%bb%80%e4%b9%88%e9%9c%80%e8%a6%81assetbundle%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.unitybundlemaster.com\/?p=79","title":{"rendered":"\u5e8f \u4e3a\u4ec0\u4e48\u9700\u8981AssetBundle\uff1f"},"content":{"rendered":"\n<p>\u8bf4\u5230 unity \u7684ab\uff0c\u901a\u5e38\u4f1a\u60f3\u5230\u70ed\u66f4\u65b0\uff0c\u5728\u5f53\u524d\u6e38\u620f\u5f00\u53d1\u4ee5\u624b\u6e38\u4e3a\u4e3b\u7684\u5927\u73af\u5883\u4e0b\uff0c\u70ed\u66f4\u65b0\u53c8\u662f\u8bb8\u591a\u624b\u6e38\u5fc5\u4e0d\u53ef\u5c11\u7684\u9700\u6c42\u3002\u624b\u6e38\u7684\u70ed\u66f4\u65b0\u9700\u8981\u5206\u4e24\u4e2a\u90e8\u5206\uff0c\u4e00\u662f\u4ee3\u7801\u7684\u70ed\u66f4\u65b0\uff0c\u4e8c\u662f\u8d44\u6e90\u7684\u70ed\u66f4\u65b0\uff0c\u800c\u8981\u60f3\u5b9e\u73b0\u8d44\u6e90\u7684\u70ed\u66f4\u65b0\uff0c\u5219\u5c31\u5fc5\u987b\u4f7f\u7528Unity\u7684 AssetBundle \u7cfb\u7edf\u3002\u4f46\u5982\u679c\u6ca1\u6709\u70ed\u66f4\u65b0\u9700\u6c42\uff0c\u90a3\u662f\u4e0d\u662f\u5c31\u4e0d\u7528\u4f7f\u7528 AssetBundle \u4e86\u5462\uff1f\u7b54\u6848\u5f53\u7136\u662f\u5426\u5b9a\u7684\u3002<\/p>\n\n\n\n<p>\u9996\u5148\u8bf4\u4e00\u4e0b\u4f20\u7edf\u7684 Resources.Load \u52a0\u8f7d\u8d44\u6e90\u7684\u7f3a\u9677\uff0c\u8981\u60f3\u4f7f\u7528 Resources.Load \u8fdb\u884c\u52a0\u8f7d\u8d44\u6e90\uff0c\u9700\u8981\u628a\u8d44\u6e90\u653e\u5728 Resources \u6587\u4ef6\u5939\u4e0b\uff0c\u4f46\u8fd9\u4e2a\u6587\u4ef6\u5939\u5728\u6253\u5305\u7684\u65f6\u5019\u4f1a\u88ab\u653e\u5165\u5305\u4f53\uff0c\u800c\u5728\u79fb\u52a8\u5e73\u53f0\u4e0b\uff0c\u5bf9\u5355\u4e2a\u5e94\u7528\u5305\u4f53\u7684\u5927\u5c0f\u662f\u6709\u9650\u5236\u7684\uff0c\u8d85\u8fc7\u4e86\u5c31\u51fa\u4e0d\u4e86\u5305\u3002Android \u662f\u9650\u52362G\uff0c\u800c iOS \u662f\u9650\u52364G\uff0c\u5c3d\u7ba1 Android \u53ef\u4ee5\u901a\u8fc7OBB \u5206\u5305\u7684\u5f62\u5f0f\u5c06\u8d44\u6e90\u5206\u79bb\u51fa\u6765\u7a81\u78342G\u7684\u9650\u5236\uff0c\u4f46\u7edd\u5927\u591a\u6570\u5185\u5bb9\u5206\u53d1\u5e73\u53f0\u90fd\u4e0d\u652f\u6301\uff0c\u800c\u4e14\u5b89\u88c5\u4e00\u4e2a .apk \u8fd8\u8981\u989d\u5916\u518d\u5b89\u88c5 .obb \u4e5f\u592a\u9ebb\u70e6\u4e86\u3002\u4f46 \u6570\u636e\u6301\u4e45\u5316\u8def\u5f84 \u4e5f\u5c31\u662f Application.persistentDataPath \u6216\u8005\u53c8\u53eb\u505a \u6c99\u76d2\u8def\u5f84\uff0c\u5bf9\u5b58\u50a8\u7684\u5927\u5c0f\u662f\u6ca1\u6709\u9650\u5236\u7684\uff0c\u8fd9\u4e2a\u8def\u5f84\u662f\u5728 app \u5b89\u88c5\u540e\u4ea7\u751f\uff0c\u56e0\u6b64\u6211\u4eec\u53ef\u4ee5\u5c06\u8d44\u6e90\u6784\u5efa\u6210 AssetBundle\uff0c\u5728app\u5b89\u88c5\u540e\u4e0b\u8f7d\u5230\u8fd9\u4e2a\u8def\u5f84\u4e0b\u4f7f\u7528\uff0c\u8fd9\u6837\u5c31\u7a81\u7834\u4e86\u5e94\u7528\u5927\u5c0f\u7684\u9650\u5236\u5e76\u4e14\u7528\u6237\u4e5f\u53ea\u7528\u5b89\u88c5\u4e00\u6b21\u3002<\/p>\n\n\n\n<p>\u90a3\u4e48\u5982\u679c\u8d44\u6e90\u5927\u5c0f\u6ca1\u6709\u8d85\u8fc72G\u4e5f\u4e0d\u9700\u8981\u70ed\u66f4\u65b0\uff0c\u6216\u8005\u5e72\u8106\u5f00\u53d1PC\u7aef\u6e38\u620f\uff0c\u662f\u4e0d\u662f\u5c31\u53ef\u4ee5\u7528 Resources.Load \u52a0\u8f7d\u8d44\u6e90\u4e86\u5462\uff1f\u5982\u679c\u786c\u7528\u7684\u8bdd\uff0c\u53ef\u4ee5\u662f\u53ef\u4ee5\u4f46\u7528\u6237\u4f53\u9a8c\u975e\u5e38\u7cdf\u7cd5\u3002Unity\u5f00\u53d1\u7684\u6e38\u620f\u5728\u542f\u52a8\u7684\u65f6\u5019\uff0c\u4f1a\u521d\u59cb\u5316Resources\u8d44\u6e90\u7684\u7d22\u5f15\u8868\uff0cResources \u4e0b\u7684\u8d44\u6e90\u8d8a\u591a\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u5c31\u8d8a\u6162\uff0c\u6162\u5230\u96be\u4ee5\u5fcd\u53d7\uff01\u56e0\u6b64\u4e3a\u4e86\u6e38\u620f\u7684\u542f\u52a8\u901f\u5ea6\uff0c\u4e5f\u662f\u9700\u8981\u4f7f\u7528 AssetBundle \u7684\u3002<\/p>\n\n\n\n<p>\u7efc\u4e0a\u6240\u8ff0\uff0c\u5982\u679c\u60f3\u8981\u597d\u597d\u5f00\u53d1\u4e00\u6b3e\u6e38\u620f\uff0cAssetBundle \u5fc5\u4e0d\u53ef\u5c11\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>91\u7126\u5148\u751f<\/p><cite>2022\/07\/18<\/cite><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf4\u5230 unity \u7684ab\uff0c\u901a\u5e38\u4f1a\u60f3\u5230\u70ed\u66f4\u65b0\uff0c\u5728\u5f53\u524d\u6e38\u620f\u5f00\u53d1\u4ee5\u624b\u6e38\u4e3a\u4e3b\u7684\u5927\u73af\u5883\u4e0b\uff0c\u70ed\u66f4\u65b0\u53c8\u662f\u8bb8\u591a\u624b\u6e38\u5fc5\u4e0d\u53ef\u5c11\u7684\u9700 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-79","post","type-post","status-publish","format-standard","hentry","category-assetbundle-"],"_links":{"self":[{"href":"https:\/\/www.unitybundlemaster.com\/index.php?rest_route=\/wp\/v2\/posts\/79","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.unitybundlemaster.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.unitybundlemaster.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.unitybundlemaster.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.unitybundlemaster.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=79"}],"version-history":[{"count":3,"href":"https:\/\/www.unitybundlemaster.com\/index.php?rest_route=\/wp\/v2\/posts\/79\/revisions"}],"predecessor-version":[{"id":97,"href":"https:\/\/www.unitybundlemaster.com\/index.php?rest_route=\/wp\/v2\/posts\/79\/revisions\/97"}],"wp:attachment":[{"href":"https:\/\/www.unitybundlemaster.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=79"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.unitybundlemaster.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=79"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.unitybundlemaster.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=79"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}