vscode编译时的报错解决办法

1、‘Debug’ is an ambiguous reference between ‘UnityEngine.Debug’ and ‘System.Diagnostics.Debug’

主要问题是:
“调试”是“ UnityEngine.Debug”和“系统”之间的歧义引用
所以命名空间要指定清楚:
UnityEngine.Debug.Log("I’m a Musician, My name is "+ name);
或者暂时不需要Diagnostics可以先注释掉
using System.Diagnostics;

2、[fail]: OmniSharp.MSBuild.ProjectManager

Attempted to update project that is not loaded: /Users/zhangsan/Desktop/Engine/gamer/My project/Unity.Services.Core.Configuration.Editor.csproj

参考以下
https://stackoverflow.com/questions/55535177/omnisharp-msbuild-projectmanager-attempted-to-update-project-that-is-not-loaded

前往设置。(代码 -> 首选项 -> Mac 上的设置)
搜索“omnisharp”。
单击“在 settings.json 中编辑”。将“omnisharp.path”更改为“omnisharp.path”:“lasted”。注意多余的引号去除
在这里插入图片描述

重新加载窗口。

猜你喜欢

转载自blog.csdn.net/weixin_44210987/article/details/127099296
今日推荐