Can't add script

Because script class not found. I don’t know what I did wrong, if anything. I can post the code if someone is willing to help. I was making a basic controller as a test run and now it just won’t work.

Hello,
Usually, this issue comes from the fact that your script
• Has a different name that its file (public class MyClass must be in a file called MyClass.cs
• Your class doesn’t inherent from MonoBehaviour (public class MyClass : MonoBehaviour)

If the first two reasons don’t apply, you can copy/paste your code here using the code tags (the button right next to “Code” in the bar on top of the text area or using ````````).

1 Like

In addition to this, make sure you don’t have any compile errors in your console. All compile errors will have to be fixed before you can attach the script.