{"id":543,"date":"2020-03-22T21:42:05","date_gmt":"2020-03-22T13:42:05","guid":{"rendered":"https:\/\/www.caiqinyi.cn\/?p=543"},"modified":"2021-04-24T12:25:14","modified_gmt":"2021-04-24T04:25:14","slug":"unity_import_package","status":"publish","type":"post","link":"https:\/\/www.caiqinyi.cn\/index.php\/2020\/03\/22\/unity_import_package\/","title":{"rendered":"Unity\u5bfc\u5165\u8d44\u6e90\u5305\u540e\u7684\u586b\u5751\u4e4b\u65c5"},"content":{"rendered":"<p>12\u53f7\u4ea4\u5b8c\u8bba\u6587\u4ee5\u540e\u5f00\u59cb\u5e72\u67d0\u6613\u6700\u540e\u4e00\u4e2a\u5165\u804c\u4efb\u52a1\u2014\u2014Unity\u4efb\u52a1, \u5176\u5b9e\u5ba2\u6237\u7aef\u90e8\u5206\u7684\u4efb\u52a1\u5185\u5bb9\u603b\u4f53\u4e0a\u8fd8\u662f\u8f83\u4e3a\u7b80\u5355\u7684, \u4e0d\u77e5\u9053\u670d\u52a1\u7aef\u90e8\u5206\u5982\u4f55, \u53cd\u6b63\u5bf9\u4e8e\u670d\u52a1\u7aef\u90e8\u5206\u7684\u5f00\u53d1\u7ecf\u9a8c\u672c\u4eba\u76ee\u524d\u51e0\u4e4e\u4e3a0, \u5e0c\u671b\u8e29\u7684\u5751\u80fd\u5c11\u70b9\u5457\u2026\u2026 \u8a00\u5f52\u6b63\u4f20, \u5728\u5bfc\u5165\u4e00\u4e2a\u7c92\u5b50\u7279\u6548\u5305\u4ee5\u540e, \u624b\u8d31\u5730\u8ba9Unity\u5e2e\u6211\u5347\u7ea7\u4e86\u6574\u4e2a\u5de5\u7a0b, \u7136\u540e\u5c31\u5dee\u70b9GG\u4e86\u2026\u2026<\/p>\n<p><!--more--><\/p>\n<p>Unity\u63d0\u793a<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"C++\" data-enlighter-theme=\"monokai\">\r\nerror CS0117: 'EditorSceneManager' does not contain a definition for 'IsGameObjectInScene'\r\n<\/pre>\n<p>\u5728StackOverflow\u4e0a\u6c42\u52a9\u53d1\u73b0\u662f\u8d44\u6e90\u5305\u7684\u7248\u672c\u592a\u65b0, \u800c\u6211\u76ee\u524d\u4f7f\u7528\u7684Unity\u7248\u672c\u8f83\u8001\u5bfc\u81f4\u7684\u7f18\u6545. \u90a3\u597d\u5457, \u6211\u5c31\u628a\u5de5\u7a0b\u76ee\u5f55\u4e0b\u7684Library\u4e0eobj\u4e24\u4e2a\u6587\u4ef6\u5939\u5220\u9664\u518d\u8ba9Unity\u91cd\u65b0\u7f16\u8bd1\u4e00\u904d\u6211\u7684\u5de5\u7a0b\u5457\u2026\u2026 \u7136\u9e45, \u8fd9\u4e2a\u88ab\u5f88\u591a\u5927\u4f6c\u63d0\u51fa\u6765\u7684\u65b9\u6cd5\u5e76\u65e0\u6548, \u76ee\u524d\u6211\u8fd8\u4e0d\u6e05\u695a\u539f\u56e0. \u65e0\u5948, \u6211\u53ea\u80fd\u65b0\u5efa\u5de5\u7a0b, \u7136\u540e\u628a\u6211\u7684Assets\u4e0eProjectSettings\u6587\u4ef6\u5939\u79fb\u8fc7\u53bb.<\/p>\n<p>\u663e\u7136, \u8fd9\u4e2a\u65b9\u6cd5\u662f\u6709\u6548\u7684, \u4f46\u8981\u540c\u65f6\u66f4\u6539\u6211\u7684\u672c\u5730git\u76ee\u5f55, \u5728\u9700\u8981\u5c06\u6240\u6709\u6587\u4ef6push\u5230\u6211\u7684git\u8fdc\u7aef\u65f6, \u7531\u4e8e\u62c5\u5fc3\u8fdc\u7aef\u4ee3\u7801\u7684\u7248\u672c\u4e0e\u672c\u5730\u7248\u672c\u4e0d\u4e00\u81f4, \u5bfc\u81f4git\u4f1a\u963b\u6b62\u8fdb\u884cpush, \u6211\u4f7f\u7528<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"C++\" data-enlighter-theme=\"monokai\">\r\ngit push -u origin master -f\r\n<\/pre>\n<p>\u8fdb\u884c\u5f3a\u5236push, \u7136\u9e45\u8fd9\u6837\u5e26\u6765\u7684\u540e\u679c\u662f\u6211\u4ee5\u524d\u7684commit\u5386\u53f2\u5168\u90e8\u4e22\u5931\u4e86\u2026\u2026 \u4f7f\u7528git reflog\u547d\u4ee4\u4f9d\u65e7\u65e0\u6cd5\u627e\u56de, \u5fc3\u7d2f, \u5c31\u5148\u9171\u7d2b\u53ed\u2026\u2026 \u5e78\u597d\u6211\u4e00\u822c\u6ca1\u6709\u56de\u6eda\u4ee3\u7801\u7684\u4e60\u60ef.<\/p>\n<p>\u603b\u7ed3\u5751\u70b9\u6709\u4e8c:<br \/>\n1. \u5728Unity\u4e2d\u5bfc\u5165\u7248\u672c\u4e0d\u4e00\u81f4\u7684\u8d44\u6e90\u5305\u65f6\u4e0d\u8981\u8ba9Unity\u81ea\u52a8\u5e2e\u4f60\u5347\u7ea7\u5de5\u7a0b;<br \/>\n2. \u5f53\u9700\u8981\u8fdb\u884c\u5f3a\u5236push\u7684\u65f6\u5019, \u5efa\u8bae\u4f7f\u7528\u5148\u62c9\u540e\u63a8\u7684\u65b9\u6cd5, \u5373\u4f7f\u7528git pull &#8211;rebase\u547d\u4ee4, \u5426\u5219\u4f1a\u9762\u4e34\u4e22\u5931commit\u5386\u53f2\u7684\u95ee\u9898, \u5f53\u7136\u5982\u679c\u76ee\u7684\u4ec5\u4ec5\u662f\u4e3a\u4e86\u521d\u59cb\u5316\u4e00\u4e2a\u4ed3\u5e93, \u90a3\u5012\u662f\u6ca1\u5565\u6240\u8c13.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>12\u53f7\u4ea4\u5b8c\u8bba\u6587\u4ee5\u540e\u5f00\u59cb\u5e72\u67d0\u6613\u6700\u540e\u4e00\u4e2a\u5165\u804c\u4efb\u52a1\u2014\u2014Unity\u4efb\u52a1, \u5176\u5b9e\u5ba2\u6237\u7aef\u90e8\u5206\u7684\u4efb\u52a1\u5185\u5bb9\u603b\u4f53\u4e0a\u8fd8\u662f\u8f83\u4e3a\u7b80\u5355\u7684 &hellip; <a href=\"https:\/\/www.caiqinyi.cn\/index.php\/2020\/03\/22\/unity_import_package\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">Unity\u5bfc\u5165\u8d44\u6e90\u5305\u540e\u7684\u586b\u5751\u4e4b\u65c5<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"_links":{"self":[{"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/posts\/543"}],"collection":[{"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/comments?post=543"}],"version-history":[{"count":5,"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/posts\/543\/revisions"}],"predecessor-version":[{"id":668,"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/posts\/543\/revisions\/668"}],"wp:attachment":[{"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/media?parent=543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/categories?post=543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/tags?post=543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}