{"id":2388,"date":"2021-05-18T17:45:43","date_gmt":"2021-05-18T09:45:43","guid":{"rendered":"http:\/\/1vr.cn\/?p=2388"},"modified":"2021-05-18T17:45:43","modified_gmt":"2021-05-18T09:45:43","slug":"macos%e4%b8%8b%e7%9a%84unity%e4%bd%bf%e7%94%a8vs-code%e6%b2%a1%e6%9c%89%e8%af%ad%e6%b3%95%e6%8f%90%e7%a4%ba%e7%9a%84%e8%a7%a3%e5%86%b3","status":"publish","type":"post","link":"https:\/\/1vr.cn\/?p=2388","title":{"rendered":"macOS\u4e0b\u7684Unity\u4f7f\u7528VS Code\u6ca1\u6709\u8bed\u6cd5\u63d0\u793a\u7684\u89e3\u51b3"},"content":{"rendered":"\n<p>Unity\u66f4\u65b0\u9891\u7387\u633a\u9ad8\u7684,\u62fe\u8d77\u8bb8\u4e45\u6ca1\u4f7f\u7528\u7684Unity,\u754c\u9762\u4f3c\u4e4e\u5f88\u964c\u751f,\u6700\u9ad8\u7248\u672c\u90fd\u52302021.1.7f1\u4e86,\u4e5f\u5f3a\u5236\u4f7f\u7528UnityHub\u4e86.\u66f4\u65b0\u4e86VS Code,\u6ca1\u6709\u8bed\u6cd5\u63d0\u793a,\u641c\u7d22\u89e3\u51b3\u65b9\u6848,\u7adf\u7136\u641c\u5230\u81ea\u5df1\u66fe\u5199\u7684\u6559\u7a0b,<\/p>\n\n\n\n<p>MACOS\u4e0bUNITY\u4e0eVS CODE\u5b89\u88c5\u914d\u7f6e:<a rel=\"noreferrer noopener\" href=\"http:\/\/1vr.cn\/?p=2006\" target=\"_blank\">http:\/\/1vr.cn\/?p=2006<\/a><\/p>\n\n\n\n<p>\u563f\u563f,\u4eca\u5929\u8fd9\u7bc7\u5c31\u4f5c\u4e3a\u524d\u6587\u7684\u8865\u5145\u5427.\u5b89\u88c5\u7528\u4e8eUnity\u7684VS Code\u6b65\u9aa4\u6bd4\u8f83\u7b80\u5355,\u9996\u5148\u662f\u5b89\u88c5VS Code,\u5168\u79f0Visual Studio Code,\u4ece\u5fae\u8f6f\u5b98\u7f51\u4e0b\u8f7d\u5b89\u88c5\u5373\u53ef,\u5176\u514d\u8d39\u4e14\u5f00\u6e90.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>VS Code:<a href=\"https:\/\/code.visualstudio.com\/Download\">https:\/\/code.visualstudio.com\/Download<\/a><\/p>\n\n\n\n<p>\u63a5\u7740\u5b89\u88c5Dotnet\u53caMomo,\u5206\u522b\u662f,\u4e0b\u8f7d\u5730\u5740\u5982\u4e0b:<\/p>\n\n\n\n<p>.NET Core SDK:<a rel=\"noreferrer noopener\" href=\"https:\/\/dotnet.microsoft.com\/download\" target=\"_blank\">https:\/\/dotnet.microsoft.com\/download<\/a><br>Mono:<a rel=\"noreferrer noopener\" href=\"http:\/\/www.mono-project.com\/download\/stable\/\" target=\"_blank\">http:\/\/www.mono-project.com\/download\/stable\/<\/a><\/p>\n\n\n\n<p>\u5b89\u88c5\u597d\u540e\u8fd0\u884cVS Code,\u5230VS Code Marketplace(\u83dc\u5355<strong>Code->Preferences->Extensions)<\/strong>\u4e2d\u5b89\u88c5C#\u6269\u5c55.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"341\" src=\"\/wp-content\/uploads\/2021\/05\/image-2-1024x341.png\" alt=\"\" class=\"wp-image-2389\" srcset=\"\/wp-content\/uploads\/2021\/05\/image-2-1024x341.png 1024w, \/wp-content\/uploads\/2021\/05\/image-2-300x100.png 300w, \/wp-content\/uploads\/2021\/05\/image-2-768x256.png 768w, \/wp-content\/uploads\/2021\/05\/image-2-1140x380.png 1140w, \/wp-content\/uploads\/2021\/05\/image-2.png 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u518d\u786e\u4fddUnity Preferences\u4e2dExternal Tools\u6307\u5411\u5230VS Code,\u81f3\u6b64\u5c31\u53ef\u4ee5\u6253\u5f00Unity\u53cc\u51fbC#\u6587\u4ef6\u4f7f\u7528VS Code\u7f16\u7a0b\u4e86,\u5982\u679c\u8fd9\u65f6\u5019\u53d1\u73b0\u6ca1\u6709\u8bed\u6cd5\u63d0\u793a,\u5e76\u4e14\u53ef\u4ee5\u5728Output\u7a97\u53e3\u770b\u5230\u5982\u4e0b\u9519\u8bef\u4fe1\u606f:<\/p>\n\n\n\n<p>omnisharp\/.msbuild\/Current\/Bin\/Microsoft.Common.CurrentVersion.targets(1216,5): Error: This project targets .NET version that requires reference assemblies that do not ship with OmniSharp out of the box (e.g. .NET Framework). The most common solution is to make sure Mono is installed on your machine (https:\/\/mono-project.com\/download\/) and that OmniSharp is started with that Mono installation (e.g. &#8220;omnisharp.useGlobalMono&#8221;:&#8221;always&#8221; in C# Extension for VS Code).<\/p>\n\n\n\n<p>\u90a3\u4e48\u9700\u8981\u6253\u5f00VS Code\u7684\u8bbe\u7f6e,\u641c\u7d22Use Global Mono,\u5c06\u5b83\u7684\u503c\u4eceauto\u6539\u4e3aalways,\u5982\u4e0b\u56fe:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"545\" src=\"\/wp-content\/uploads\/2021\/05\/image-3-1024x545.png\" alt=\"\" class=\"wp-image-2390\" srcset=\"\/wp-content\/uploads\/2021\/05\/image-3-1024x545.png 1024w, \/wp-content\/uploads\/2021\/05\/image-3-300x160.png 300w, \/wp-content\/uploads\/2021\/05\/image-3-768x409.png 768w, \/wp-content\/uploads\/2021\/05\/image-3-1536x818.png 1536w, \/wp-content\/uploads\/2021\/05\/image-3-2048x1091.png 2048w, \/wp-content\/uploads\/2021\/05\/image-3-713x380.png 713w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u6839\u636e\u63d0\u793a\u91cd\u542fVS Code\u5373\u53ef\u6b63\u5e38\u4f7f\u7528,\u4e0b\u9762\u662f\u5efa\u8bae\u5b89\u88c5\u7684\u51e0\u4e2a\u6269\u5c55\u63d2\u4ef6,\u5982Debugger for Unity,Unity Tools,Unity Code Snippets,Unity Snippets\u7b49:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"307\" src=\"\/wp-content\/uploads\/2021\/05\/image-4-1024x307.png\" alt=\"\" class=\"wp-image-2391\" srcset=\"\/wp-content\/uploads\/2021\/05\/image-4-1024x307.png 1024w, \/wp-content\/uploads\/2021\/05\/image-4-300x90.png 300w, \/wp-content\/uploads\/2021\/05\/image-4-768x230.png 768w, \/wp-content\/uploads\/2021\/05\/image-4-1180x353.png 1180w, \/wp-content\/uploads\/2021\/05\/image-4.png 1510w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u597d\u4e86,\u5c31\u5199\u5230\u8fd9\u91cc,\u56de\u89c1!<\/p>\n\n\n\n<p>\u53c2\u8003\u94fe\u63a5:<a href=\"https:\/\/code.visualstudio.com\/docs\/other\/unity\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/code.visualstudio.com\/docs\/other\/unity<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unity\u66f4\u65b0\u9891\u7387\u633a\u9ad8\u7684,\u62fe\u8d77\u8bb8\u4e45\u6ca1\u4f7f\u7528\u7684Unity,\u754c\u9762\u4f3c\u4e4e\u5f88\u964c\u751f,\u6700\u9ad8\u7248\u672c\u90fd\u52302021.1.7f1\u4e86,\u4e5f\u5f3a &hellip; <a href=\"https:\/\/1vr.cn\/?p=2388\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">macOS\u4e0b\u7684Unity\u4f7f\u7528VS Code\u6ca1\u6709\u8bed\u6cd5\u63d0\u793a\u7684\u89e3\u51b3<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[210,98,211],"class_list":["post-2388","post","type-post","status-publish","format-standard","hentry","category-5","tag-unity","tag-vs-code","tag-vscode","without-featured-image"],"_links":{"self":[{"href":"https:\/\/1vr.cn\/index.php?rest_route=\/wp\/v2\/posts\/2388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/1vr.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/1vr.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/1vr.cn\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/1vr.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2388"}],"version-history":[{"count":1,"href":"https:\/\/1vr.cn\/index.php?rest_route=\/wp\/v2\/posts\/2388\/revisions"}],"predecessor-version":[{"id":2392,"href":"https:\/\/1vr.cn\/index.php?rest_route=\/wp\/v2\/posts\/2388\/revisions\/2392"}],"wp:attachment":[{"href":"https:\/\/1vr.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/1vr.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/1vr.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}