Jake
Jake

Reputation: 228

Namespace name 'UnityEngine' could not be found

I'm following the roll-a-ball tutorial from the Unity3D website. When I try building PlayerController.cs in MonoDevelop-Unity, I receive the following error:

The type or namespace name 'UnityEngine' could not be found. Are you missing an assembly reference?

The smallest C# program that can reproduce this error is the single line

using UnityEngine;

I found two solutions for this problem online:

  1. Reinstall Unity.
  2. In the Unity editor, go to Edit -> Preferences -> External Tools -> External Script Editor, select the drop down and manually select MonoDevelop.

I have tried both and neither work.

I am using the experimental build of Unity 5.1.0f3 on Linux.

Upvotes: 2

Views: 15728

Answers (1)

user3071284
user3071284

Reputation: 7100

There's no need to build files via Monodevelop. To play the game, just use the play button in Unity; alternatively, you can build the game in File -> Build Settings.

Upvotes: 3

Related Questions