{"id":1793,"date":"2020-04-18T08:48:55","date_gmt":"2020-04-18T00:48:55","guid":{"rendered":"http:\/\/blog.coolcoding.cn\/?p=1793"},"modified":"2020-04-18T08:48:55","modified_gmt":"2020-04-18T00:48:55","slug":"unity%e8%b5%84%e6%ba%90%e4%be%9d%e8%b5%96%e5%8f%8d%e6%9f%a5%e5%b7%a5%e5%85%b7","status":"publish","type":"post","link":"https:\/\/blog.coolcoding.cn\/?p=1793","title":{"rendered":"[Unity]\u8d44\u6e90\u4f9d\u8d56\u53cd\u67e5\u5de5\u5177"},"content":{"rendered":"\n<p>\u867d\u7136Unity\u63d0\u4f9b\u4e86\u8d44\u6e90\u7684\u6b63\u5411\u4f9d\u8d56\u67e5\u8be2\uff0c\u4e5f\u5c31\u662f\u4e00\u4e2aPrefab\u5f15\u7528\u4e86\u54ea\u4e9b\u8d44\u6e90\uff0c\u662f\u53ef\u4ee5\u4f7f\u7528EditorUtility.CollectDependencies\u51fd\u6570\u5168\u90e8\u627e\u51fa\u6765\u7684\u3002<\/p>\n\n\n\n<p>\u4f46\u662f\uff0c\u5982\u679c\u5728\u9879\u76ee\u4e2d\uff0c\u6211\u60f3\u77e5\u9053\u4e00\u4e2aScript\uff0c\u6216\u8005\u4e00\u4e2a\u56fe\u7247\u5230\u5e95\u88ab\u54ea\u4e9bPefab\u3001material\u7528\u4e86\uff0c\u5982\u679c\u6ca1\u4eba\u7528\u4e86\uff0c\u6211\u5c31\u53ef\u4ee5\u5220\u6389\u4e86\u3002<\/p>\n\n\n\n<p>\u53ef\u60dcUnity\u6ca1\u6709\u63d0\u4f9b\u8fd9\u4e2a\u5de5\u5177\u3002<\/p>\n\n\n\n<p>\u5236\u4f5c\u65b9\u6848\u4e00\uff1a\u9009\u5b9a\u4e00\u7ec4\u8d44\u6e90\u5bf9\u8c61\uff0c\u83b7\u5f97\u5176GUID\u7ec4<br>\n\u7136\u540e\u901a\u8fc7AssetDatabase.GetAllAssetPaths\u83b7\u5f97\u628a\u6709\u7684\u8d44\u6e90\u5217\u8868\uff0c\u518d\u904d\u5386\u6bcf\u4e2a\u8d44\u6e90\uff0c\u4f7f\u7528EditorUtility.CollectDependencies\u67e5\u8be2\u6307\u5b9a\u7684GUID\u7ec4\u662f\u5426\u4f9d\u8d56\u6b64\u8d44\u6e90\u3002<\/p>\n\n\n\n<p>\u5236\u4f5c\u65b9\u6848\u4e8c\uff1a\u9009\u5b9a\u4e00\u7ec4\u8d44\u6e90\u5bf9\u8c61\uff0c\u83b7\u5f97\u5176GUID\u7ec4<br>\n\u7136\u540e\u904d\u5386Assets\u4e0b\u9762\u6240\u6709\u7684Prefab\u3001Material\u3001AnimationControl\u7b49\u6587\u4ef6\uff0c\u8bfb\u53d6\u6b64\u6587\u4ef6\u5185\u5bb9\u505a\u6587\u672c\u5206\u6790<\/p>\n\n\n\n<p>\u53ea\u8981\u91cc\u9762\u542b\u6709GUID: XXXXXXXXXX \u7684\uff0c\u5373\u4e3a\u4f9d\u8d56\u9879\u3002<\/p>\n\n\n\n<p>\u7ecf\u5b9e\u6218\u53d1\u73b0\uff0c\u65b9\u6848\u4e8c\u901f\u5ea6\u98de\u5feb\uff0c\u4e00\u822c\u53ea\u89815-6\u79d2\u53ef\u5b8c\u6210\u53cd\u67e5\uff08\u9879\u76ee\u5bb9\u91cf1GB\u5de6\u53f3\uff0c\u6587\u4ef6\u4e2a\u657010K\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u867d\u7136Unity\u63d0\u4f9b\u4e86\u8d44\u6e90\u7684\u6b63\u5411\u4f9d\u8d56\u67e5\u8be2\uff0c\u4e5f\u5c31\u662f\u4e00\u4e2aPrefab\u5f15\u7528\u4e86\u54ea\u4e9b\u8d44\u6e90\uff0c\u662f\u53ef\u4ee5\u4f7f\u7528EditorUtili [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/1793"}],"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=1793"}],"version-history":[{"count":1,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/1793\/revisions"}],"predecessor-version":[{"id":1794,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/1793\/revisions\/1794"}],"wp:attachment":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1793"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}