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?

could you please post your code

[83709-problem.jpg|83709] @qvindicator, here is what you requested. I apologize for the delayed reply.

1 Answer

1

From Unity Editor menu, go to Assets and select “Open C# Project”.
It may “re-link” the project with MonoDevelop and fix this.

@mhhk88 , I suggested to get ScreenPoints, because the coordinates will be relative to the camera position. wolrdPoint to screen point coordinates, is just mapping any 3d point in the unity scene into its projection on the screen plane.