DEV Community

Aishanii
Aishanii

Posted on

1

Can't add script component because the script class cannot be found

Alt Text
Try these:

1. Check if the name of the file is same as the class name or not. The class that associates with Monobehaviour must be same as the file name.

2. Check for any errors in your script

3. Bad import. In that case just right click your mouse in the project folders section and select Reimport All option.

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay