VS Code showing errors in Editor scripts while referencing another class
The problem seems trivial, but I can't manage to fix it: in a Editor script (placed in the Assets/Editor folder) whenever I make a reference to class that is not in the Editor folder, Visual Studio Code is showing a CS0246 error:
The type or namespace name 'RandomClass' could not be found (are you missing a using directive or an assembly reference?) [Assembly-CSharp-Editor]
No issue on Unity's side, the script is compiling nicely, but it is still annoying to not have autocompletion working properly.
I'm running Unity 2019.4.0f1 with Visual Studio Code 1.51.1
Answer by Patrickmol · Nov 17, 2020 at 06:48 PM
Sometimes on me VS bugs out and I open him up again to make him come back and he does so I suggest you to go on YouTube and search for a video about which VS to use on unity... I saw that 2 years ago and I have never had problem after that.
Your answer
Follow this Question
Related Questions
UWP build crashes with "Windows.Gaming.Input.dll: Access denied" - what does it mean? 0 Answers
Missing type/namespaces do not allow me to playtest? 0 Answers
I am getting a CS1504 error in Unity,I am getting a CS1504 error 0 Answers
Scripts won't update in editor after changing them in VScode 0 Answers