I am really new in Unity 5 and I ain’t programmer. I have been playing around with some C# scripts here and there until this issue arise (The referenced script on this Behaviour is missing)…#%* I have googled answers such us “Remove the missing reference from your GameObject. You attached your script to something, remove the now missing component, and done.” but I have no idea how to implement these actions in Unity 5.
Select the gameobject with the component in quetion. Then, in the inspector, left click on the icon at the top right corner of the component the error is about and select “Remove component” from the drop-down list.
Your trying to access a script on a GameObject which the script is not properly attached, so you can simply fix by adding that script to the GameObject.
In the inspector on that gameobject you should see this :
Press the settings icon in the top right and then select Remove Component as seen here below :
then you would simply need to re-add the said script to the GameObject
Duugu and 5vStudios thank you very much for providing help!!! After detaching/reattaching and copy pasting new C# scripts on my capsule I now get “error CS0101: The namespace ‘global’ already contains a definition for Controller”
Basically I am trying to create a character controller for a space racing game I have in mind following THIS tutorial on how to create a character controler. So far I wrote:
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(CharacterController))]
public class Controller : MonoBehaviour {
public float MoveSpeed;
public float RotationSpeed;
CharacterController cc;
// Use this for initialization
void Start () {
cc = GetComponent();
}
// Update is called once per frame
void Update () {