I am working on a car driver game in Unity. I was attempting to make some touch screen buttons and adding a C# script for testing mouse and touch input, but I get the console error message
"Assets/Standard Assets/MouseButton.cs(4,28): error CS0246: The type or namespace name `MonoBehavior' could not be found. Are you missing a using directive or an assembly reference?"
Script listed below:
using UnityEngine;
using System.Collections;
public class MouseButton : MonoBehavior {
void OnMouseDown() {
Debug.Log("The Mouse is down on " + this.name);
}
void OnMouseUp()
{
Debug.Log("The Mouse is up on " + this.name);
}
}