Hi guys, i'm new on unity programming and i'm trying to build my first game, but i'm getting several errors, and mostly are these Error CS0246: The type or namespace name "MonoBehaviour" could not be found. Are you missing an assembly reference? All of my scripts are getting this error. this is one of my scripts to show you whats going on: using System.Collections; using System.Collections.Generic; using UnityEngine; public class Laser : MonoBehaviour { [SerializeField] private float _speed = 10.0f; public GameObject laser; // Use this for initialization void Start () { } // Update is called once per frame void Update () { transform.Translate(Vector3.up * _speed * Time.deltaTime); if(transform.position.y >= 6) { Destroy(laser); } } }
Are you getting these errors in Unity's console? Does this happen when Unity goes to automatically compile your scripts when you switch back to Unity, or when you press the Build button on the BuildSettings window? https://docs.unity3d.com/Manual/BuildSettings.html
Yes i'm getting on the console. It happens when I try to build, then nothing happens and those errors appears...