How to fix CS0246 error
Hello,
I am not a coder, but am trying my best to understand how to use both Unity and MonoDevelop. Using a C# script, I am getting a CS0246 error on two different lines, the first line is "using UnityEngine;" with the error message "The type or namespace name 'Unity Engine' could not be found (are you missing a using directive or an assembly reference?)". followed by line 4 "public class DayNightCycle : Monobehaviour {" and "The type or namespace name 'MonoBehaviour' could not be found (are you missing a using directive or an assembly reference?)". How would I be able to fix this?
Answer by UnityCoach · Dec 09, 2016 at 12:10 PM
From Unity Editor menu, go to Assets and select "Open C# Project". It may "re-link" the project with MonoDevelop and fix this.