I opened the ".cs" file from Unity after creating a C# file in my project, however
neither UnityEngine nor (obviously) MonoBehaviour is detected in VS Code.
Due to this, Intellisense also can't help, which is a major obsticle for me, because I am completely new to the UnityEngine library. The OmniSharp log also gives a
warning in the output:
[fail]: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: c:\Users\bomka\My project\Assembly-CSharp.csproj
[warn]: OmniSharp.Roslyn.CSharp.Services.InlayHints.InlayHintService
Inlay hints requested for document not in workspace Location { FileName = c:\Users\bomka\My project\Assets\scripts\Circle.cs, Range = Range { Start = Point { Line = 0, Column = 0 }, End = Point { Line = 19, Column = 0 } } }
Things I've tried so far:
- I've redownloaded both Unity and VS Code (latest versions, which are 2021.3.3f1 and 1.67.2, respectively)
- I checked whether Visual Studio Code Editor and Visual Studio Editor were downloaded in Unity's Package Library (they are, it's 1.2.5 and and 2.0.15, respectively)
- I changed
omnisharp.pathto "latest" in VS Code because I've read it resolved the "Attempted to update project..." issue. It didn't really do anything unfortunately
Does anyone have any ideas concerning what I should do here? Another useful piece of information is that this is my first ever Unity Project and so VS Code didn't just decide to malfunction after a while, this is how it's been behaving since I started writing my first piece of code for my project.
Cheers!