Unity: Scripts, meta and You

IMPORTANT UNITY SERVICE ANNOUNCEMENT: 

PROBLEM:
Can't add script.
Can't add component 'component' because it doesn't exist.
The associated script can not be loaded.
Please fix any compile errors and assign a valid script.

SOLUTION:
Only move scripts using the editor. Only rename scripts using the editor. Always make sure the file name of the script matches the class name in the script. These problems are generally due to meta file oopsies of one kind or another, since Unity provides so much integration between your code and the editor window.

STILL BROKE:
Ya dun goofed. Check whether the script actually exists, and if the script's .meta file is in the same folder (or exists at all). If all else fails delete all .meta files and let Unity rebuild them all. 

STIIL BROOOOK:
Google it.

No comments:

Post a Comment