unity编辑器安装路径_Mac VSCode开发Unity环境配置

折腾了两天终于解决了VSCode,开发Unity不会代码联想自动补全的问题

配置后的效果如下:

0b614ec126eece94a95787874f3520c3.gif

1.安装Unity

2.下载安装.Net Core SDK

https://dotnet.microsoft.com/download/dotnet-core/3.1

db5efc4647a17599623a58a2f0d5ba49.png
➜  ~ dotnet --version
3.1.402

3.下载安装Mono SDK

ec180399c71116307e915431593e6010.png

https://www.mono-project.com/download/stable/

➜  ~ mono --version
Mono JIT compiler version 6.12.0.93 (2020-02/620cf538206 Tue Aug 25 14:04:52 EDT 2020)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug
	Interpreter:   yes
	LLVM:          yes(610)
	Suspend:       hybrid
	GC:            sgen (concurrent by default)

4.安装VSCode

4.1 安装VSCode插件

C#
C# Extensions
C# FixFormat Fixed
Debugger for Unity
Unity Tools
Unity Code Snippets
Unity Snippets

4.2 VSCode配置omnisharp路径

如果不配置这个,确实可以开发了,但是各种类型不认

f1a05cd90640a52ef0af6439e59be010.png

设置路径:

Code -> Preferences -> Settings, 检索mono, 点击settings.json

d35a1fa4bf234843ee182eb9907bdd89.png

87257490ea8aef801e21bed26687636d.png

配置omnisharp(很重要)

"omnisharp.monoPath": "/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono",
"omnisharp.useGlobalMono": "always"

设置.zshrc/.bash_profile环境变量(很重要)

export FrameworkPathOverride=/Library/Frameworks/Mono.framework/Versions/Current

5.设置Unity代码编辑器

c6ab6cdad4dc3f5fa57fd8210e3621d6.png

现在就可以各种愉快的开发Unity了~

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值