Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by NeilKball · Jul 27, 2018 at 12:28 AM · errorscript.error message

Can't Add Script Behavior...

I've been struggling with this issue for about two days now, trying everything I could find via searching the web etc.

All of my scripts suddenly stopped working. Under the inspector, they all say "No MonoBehaviour scripts in the file, or their names do not match the file name." All of my scripts have classes that match the file names and all are properly extending MonoBehaviour.

What's really weird is when I try to drag a script onto a GameObject, I get this sort of error message: alt text

It used to be "Can't add script behaviour TMP_CoroutineTween. To attach a script it needs to be derived from MonoBehaviour." (Or something to that effect, best I can remember.)

I've tried closing and opening Unity. I've tried restarting my computer. I even uninstalled Unity and did a fresh reinstall of it. I'm new to Unity, so maybe there's something obvious I'm missing, but for the life of me I can't figure it out. I don't recall taking any particular action that seemed to trigger this error, I just opened my project to start work again for the day and suddenly none of my scripts worked.

Thanks in advance for your time and help!

screenshot-1.png (403.7 kB)
Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image NoDumbQuestion · Jul 27, 2018 at 01:43 AM 0
Share

It say can't add "Package base test". Unity is looking at the wrong script to add.

Or you are trying to add script from inside folder "Editor"

Try add script from inside GameObject Inspector. $$anonymous$$ight help

avatar image NeilKball NoDumbQuestion · Jul 27, 2018 at 04:06 AM 0
Share

I'm not trying to add a script from an "Editor" folder, so that's not the issue. When I try to add a script I've already made via the GameObject Inspector, none of my scripts show up. When I add a script via the Add Component --> New Script option it lets me create a new script, but then it still says there's "No $$anonymous$$onoBehaviour scripts in the file" even though clearly it is. Good thoughts, but no luck yet.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by ismadi · Jul 27, 2018 at 02:10 AM

FIXED > open script , copy all text, delete that script, create a new script name, different with previous name, paste all script to a new script & make sure script MonoBehaviour name same with script filename. That's all.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image NeilKball · Jul 27, 2018 at 04:07 AM 0
Share

This does not help solve my problem. Any new script I make still has this same issue and this issue applies to every single script in the project.

avatar image ismadi · Jul 27, 2018 at 04:31 AM 0
Share

This error came after u upgrade ur Unity so $$anonymous$$onoBehaviour cannot recognize ur script. The other way is, move all your script outside from Unity project & add 1 by 1 and reset every script u have insert it.

avatar image NeilKball ismadi · Aug 01, 2018 at 12:04 AM 0
Share

I don't understand what you mean by "reset every script u have insert it". I've tried deleting scripts and re-adding them before, but any new script I make still has the same issues.

avatar image
0

Answer by NoDumbQuestion · Jul 27, 2018 at 04:09 AM

Look at your Console. You got an error in a script(MoveMode.cs). That's why unity don't want you to add any more script until you fix that error.

I can see clearly that MoveMode.cs have mistype function inside it.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image NeilKball · Aug 01, 2018 at 12:03 AM 0
Share

I fixed the $$anonymous$$ove$$anonymous$$ode.cs script and still have the same project-wide issues.

avatar image NoDumbQuestion NeilKball · Aug 01, 2018 at 12:46 AM 0
Share

Check console. What it say?

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

189 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Getting error on lap counter script JS 0 Answers

"The associated script cannot be loaded" 0 Answers

"The associated script cannot be loaded." 0 Answers

Object reference not set to an instance of an object (c#) 0 Answers

cannot convert from 'Unity.Entities.Entity' to 'Unity.Entities.EntityQuery' 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges