The type or namespace 'Unity Engine' could not be found

I get this error whenever creating the script through unity while making a game but if i create a project in MonoDev then the program works. I just reinstalled unity also so it doesn’t seem to be able to be fixed by reinstalling and i need to create a lot of scripts through the game so i would like a solid solution to fix this

I just took your code (with remarks removed) and received no errors. (see below)

using UnityEngine;
using System.Collections;

public class PlayerController : MonoBehaviour
{
    private Rigidbody rb;
    public float speed;

    void Start ()
    {
        rb = GetComponent<Rigidbody>();
    }

    void FixedUpdate()
    {
        float moveHorizontal = Input.GetAxis ("Horizontal");
        float moveVertical = Input.GetAxis ("Vertical");

        Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
        rb.AddForce (movement * speed);
    }
}

I would suggest removing all references to he file in Unity, the close and re-open Unity and add the code above or use this file [80301-playercontroller.zip|80301] (unzip it first).

If you are still having problems then remove all references to PlayerController, close Unity, delete the folder Library in you project folder. When you reopen Unity the Library will be recreated.

Looks like you’ve got an erroneous space there - the namespace is “UnityEngine”, not “Unity Engine”.

Whenever your script uses stuff from Unity like MonoBehaviour, Vector3, etc, you need to make sure that at the top of the file you include the line

using UnityEngine;

For example:

ExampleClass.cs

using UnityEngine;

public class ExampleClass : MonoBehaviour {
    public Vector3 exampleVector;
    
    void Start() {
        Debug.Log(exampleVector);
    }
}

Edit: I just looked at the above comments, so I’m not sure how helpful this answer would be.