I am trying to put a gameobject into a prefab. Unity says "You are trying to save a Prefab that contains the script 'NPCDebugInfo', which does not derive from MonoBehaviour. This is not allowed. Please change the script to derive from MonoBehaviour or remove it from the GameObject 'yourgameobject'.
However, I don't see what I should do.
The script in question looks like this:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.UI;
public class NPCDebugInfo : MonoBehaviour
{
public Transform ThePlayer;//public so that we see it in the IDE. If we don't want that, make it private
...
I don't know what Unity really means and wants from me. What could I do to make this error message go away?
ps: For a clean test, I have created an empty gameobject and tried put my script onto it. Unity says "The script is an editor script."
So I will first find out what goes on here and why the script is actually on the other gameobject.
Thank you!