3. Scriptable Object Primer, Visual Studio 2019 community problem

I use the developed software that is Visual Studio 2019 community. But Unity will print these warning messages in the console window. How do I resolve this problem provide Unity to print these messages?

void Start()
{
    foreach(var item in contents)
	{
        Debug.Log($"Has Item: {item.GetName()}");
	}
}

Error detecting Visual Studio installations: System.ArgumentException: JSON parse error: Invalid escape character in string.
at (wrapper managed-to-native) UnityEngine.JsonUtility.FromJsonInternal(string,object,System.Type)
at UnityEngine.JsonUtility.FromJson (System.String json, System.Type type) [0x0005c] in :0
at UnityEngine.JsonUtility.FromJson[T] (System.String json) [0x00001] in :0
at Microsoft.Unity.VisualStudio.Editor.Discovery+VsWhereResult.FromJson (System.String json) [0x00001] in C:\Users\AkiraSurface\Documents\SVNnew\Unity\test\New Unity Project (1)\Library\PackageCache\com.unity.ide.visualstudio@2.0.2\Editor\Discovery.cs:93
at Microsoft.Unity.VisualStudio.Editor.Discovery.QueryVsWhere () [0x000b1] in C:\Users\AkiraSurface\Documents\SVNnew\Unity\test\New Unity Project (1)\Library\PackageCache\com.unity.ide.visualstudio@2.0.2\Editor\Discovery.cs:160
at Microsoft.Unity.VisualStudio.Editor.Discovery+d__0.MoveNext () [0x0003e] in C:\Users\AkiraSurface\Documents\SVNnew\Unity\test\New Unity Project (1)\Library\PackageCache\com.unity.ide.visualstudio@2.0.2\Editor\Discovery.cs:22
at System.Collections.Generic.LargeArrayBuilder1[T].AddRange (System.Collections.Generic.IEnumerable1[T] items) [0x0005e] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at System.Collections.Generic.EnumerableHelpers.ToArray[T] (System.Collections.Generic.IEnumerable1[T] source) [0x00033] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable1[T] source) [0x00018] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at Microsoft.Unity.VisualStudio.Editor.VisualStudioEditor…cctor () [0x00002] in C:\Users\AkiraSurface\Documents\SVNnew\Unity\test\New Unity Project (1)\Library\PackageCache\com.unity.ide.visualstudio@2.0.2\Editor\VisualStudioEditor.cs:36
UnityEngine.Debug:Log(Object)
Microsoft.Unity.VisualStudio.Editor.VisualStudioEditor:.cctor() (at Library/PackageCache/com.unity.ide.visualstudio@2.0.2/Editor/VisualStudioEditor.cs:42)
System.Activator:CreateInstance(Type)
Unity.CodeEditor.CodeEditor:get_Current()
Unity.CodeEditor.CodeEditor:get_CurrentEditor()
UnityEditor.VisualStudioIntegration.UnityVSSupport:IsDefaultExternalCodeEditor()

It appears, after a bit of searching, that you may not have the right version of the Visual Studio Community plugin installed.

Make sure that VS Community 2019 is up to date.
Go to the Package Manager, and make sure that the Visual Studio Editor is up to date.
Also, in Editor/Preferences/External Tools, make sure that your External Script Editor is set to Visual Studio Community 2019.

Privacy & Terms