The script don't inherit a native class that can manage a script.

Hi, I am using the latest Unity 2020 (2020.2.0.a13) and every time I try to attach a script it won’t let me, complaining that “The script don’t inherit a native class that can manage a script.”

I encountered this problem first time couple days ago, I don’t remember if turning my pc on/off or closing Unity solved it.

Now I am stuck with this issue, I tried what I mentioned above without success. Any suggestion?g)

(I have created an empty script that basically just inherits from MonoBehaviour and tried to attach it to an empty gameObject, won’t let me so frustrating)

For me this occured when my script did not contain a class with the same name as the script. E.g. script name is “MyScript.cs” you need a class named “MyScript” inside, otherwise you will get this error.

I went back into my ctrl+z and found I accidentally moved the MonoBehaviour script from it’s home. Not saying that’ll work for you but it fixed my “The script don’t inherit a native class that can manage a script” problem

What I think makes this problem is that you give your Script a name that has a space in it. Unity Automatically makes your class have this name with a space included as well and a Class name can’t have spaces in it. This is what causes the problem. Make another script that doesn’t include a space and see if this works.,This

Delete the script, Click on the game object in the Hiearchy, you need to attach the script to. In the Inspector, go to Add Component/New Script. Name it what you want hit Create and Add

Hi, in my case I have a Generics Class named Grid, which is defined as public class Grid<TGridObject> which file name is Grid.cs but I’m still having the same error. Any additional idea to fix this?