Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
avatar image
0
Question by ryf9059 · Apr 08, 2013 at 07:25 PM · editorcompile-error2dtoolkit

Unity crashed, then alll scripts can't be loaded

No idea why this happened.

Unity went to black screen, possibly something to do with video card driver problem, regardless, it stopped responding and I have to close it to restart it.

Upon restart, I notice all my sprite images are missing, only with box colliders, and I went to inspector. It says "the associated script cannot be loaded, please fix any compile errors and assign a valid script". I then when to inspect the code but I have done nothing to change anything. So I simply rebuild them and then I got bunch of errors all related to the unity library itself, such as "the type or namespace 'unityengine' could not be found'. 'the type or namespace 'MonoBehaviour' could not be found, are you missing an using directive or assembly reference?'

I also found my 2D Toolkit plugin is missing, except one list on the menu bar with one option "Setup for javascript", there used to be a lot more than this, re-importing doesn't fix the problem.

What happened here? I think this might be a bug with Unity...

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 rednax20 · Apr 08, 2013 at 08:26 PM 0
Share

are you sure that you are in the right project?

avatar image ryf9059 · Apr 09, 2013 at 03:54 AM 0
Share

@rednax20 Positively

8 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Dracorat · Apr 08, 2013 at 08:37 PM

Steps you should take:

A) Reboot completely.

B) If that doesn't work, try re-installing Unity and rebooting again.

C) If that doesn't work, create a new project, add an object and attach one of the scripts from the other project.

C-1) If it works, tears might be involved because it's likely something was corrupted on the other one. Work slowly through all associated objects and carefully make sure that the settings are correct.

C-2) If it doesn't work, check that the script is valid. Use a default built-in one and see if it works. If it does but yours doesn't, there's a problem with your script

C-3) If a default built-in script won't work, you probably have a very bad hardware-level problem. Try the project on another computer. If it works there, get your PC serviced.

D) If it still won't work anywhere, including the built-in scripts, let us know because that would be something ridiculous.

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 ryf9059 · Apr 10, 2013 at 06:35 AM 0
Share

I reinstall unity and it works, thanks

avatar image ryf9059 · Apr 10, 2013 at 07:22 AM 0
Share

Damn, this problem just happened AGAIN, now I start to doubt if that's the problem with my 2D Toolkit plugin...reinstalling everytime is annoying...

avatar image DjDonrio · Apr 23, 2014 at 03:35 AM 0
Share

I had to delete and reimport the character controllers to work again in a new project..

How my last project got messed up- I downloaded the hoverscript from https://www.youtube.com/watch?v=Z8YG$$anonymous$$QvEz1Y.. It worked until I went to modify the maximum x and y in the mouselook script. Changing those values didnt make any difference.. After restarting I saw all those scripts under the character controller showing it had compilation errors.. That behaviour didnt make any sense to me as I am sure I did not modify anything using the monodev. Then I thought maybe changing that maximum x and maximum y values caused the problem(had nothing else to believe in :D) so I looked up on google for this http://answers.unity3d.com/questions/29741/mouse-look-script.html replaced the whole with the built in one and $$anonymous$$rs were involved in the decision of switching to cryengine... Because every single scripts in my project somehow got infected with HIV and had compilation errors..

avatar image
1
Wiki

Answer by dylanfries · Jul 16, 2013 at 01:34 AM

I had this problem and fixed it by fixing the compile bugs. Specifically

error CS0070: The event tk2dUIItem.OnClickUIItem' can only appear on the left hand side of += or -= when used outside of the type tk2dUIItem'

which resulted from trying to call

 item.OnClickUIItem() -= FunctionName;

rather then

 item.OnClickUIItem -= FunctionName;

as referenced here from unikronsoftware. As they mention, its Unity choking on one of your script errors and causing everything to fail to compile in a bad way. Its worth a look anyways before doing a complete reinstall.

Comment
Add comment · 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
0

Answer by Cornotiberious · Jul 16, 2013 at 01:57 AM

I've had this problem. for me, one of my scripts was blank, and that was causing trouble. It probably isn't the issue, but take a look through your scripts to see if one might be blank.

Comment
Add comment · 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
0

Answer by polmonroig · Apr 21, 2014 at 10:32 PM

To solve this error I veryfied the script folder location and change it to to the one where the script was originally.

Comment
Add comment · 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
0

Answer by Tekksin · May 12, 2014 at 02:19 PM

What worked for me was going to my latest script. I accidentally wrote

"if(player.something({ something = true; }"

Did you notice the error? Backwards ending parenthesis. I didn't even notice. At that point I got the error similar to what was mentioned in this post. Just make sure there are no errors in your scripts, so that unity doesn't have a reason to complain. Once fixing this very minor error, my unity was reloaded and all the scripts and variables were still in tact.

Check your old scripts before you do this (almost) insane delete and re-import suggestion.

Comment
Add comment · 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
  • 1
  • 2
  • ›

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

21 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

Related Questions

A node in a childnode? 1 Answer

How to use Editor script? 3 Answers

Unity Script Editor Not Working 1 Answer

Paint on object in editor and return as texture. 1 Answer

Scripting a "Unity Editor"-like object transformation control 1 Answer


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