Refrencing Monobehaviour in the Editor

Hello everyone. I’m currently watching the “Build Your Own FPS Survival Game” Udamy course.
I’ve done everything the way the instructor said but I keep getting these errors.
One script is in Movobehaviour and scripts folder, the other one is in Editor.

Thanks so much for your help.

Unity version: 2020.1.6f1 64bit
IDE: VSCODE

First of all you should get rid of the duplicated using statement for the System.Collections.Generic namespace as your IDE suggests. You already have this using statement in line 2 so line 4 is redundant.

Next thing is editor scripts and runtime scripts generally live in seperate assemblies. Here it’s important to note that Unity will compile your scripts, not VisualStudio. When you create a new script, edit it and saved it, you have to switch to Unity in order for the script to get imported, compiled and to get the VisualStudio solution (and its C# projects) updated.

@amirhosseinzarei151 you sure you monobehaviour script isn’t in the editor folder. Also maybe restart unity

@Bunny83 @MurphyMurph_21

OK, guys thank you so much. Everything was fixed. Here’s what I did and here’s what happened if anyone faces this problem later.
Problem: Unity and IDE error while trying to learn Navigation and Pathfinding in “Build your own FPS survival game”.
Fixes in steps:
1.Got rid of the duplicate code above.
2.Restarted Unity and VScode.
3. Everything crashed. My saved layout was lost.
4. VSCode still gave me errors but they didn’t matter because Unity was fine this time and it worked perfectly.