- Home /
Find which script is missing when "the associated script cannot be loaded"
This might be a noob question, even though I've been using Unity for a while. Is it possible to see what script Unity is looking for when it shows the "missing script" error on a GameObject? I've pasted the text here for search engine helpfulness:
The associated script cannot be loaded. Please fix any compile errors and assign a valid script.
I'm currently getting this because I copied a prefab from one project to another (in the file system) instead of importing it. I know I can fix it by adding the scripts back in by hand, but I've always wondered if there's a way to get Unity to tell me what it's looking for when it says this – a script name, a file path, any clue at all really.
It's such an unbelievably unhelpful error message... surely there is a way?
I'd like to know as well. I tried making it a prefab, forcing all assets to be save as text and browsed its contents but there was nothing to indicate what the script had initially been so in my case it seems like unity had not saved anything realted to it. $$anonymous$$aybe I had no assigned variables in it originally (I don't know what script it was so I don't know). But, from what I can find it is not possible. I'd love for someone who actually knows to give an answer though...
I also posted a similar question. The problem arises also about fonts, with the messages:
BestFit is only suppoerted for dynamic fonts. (with typo)
and similar ones
Answer by gdbjohnson3 · Feb 24, 2019 at 06:03 PM
Because it's 2019. Are there any decent answers to this question yet? When this happens, I've been lucky to know which one the script is, but seriously how can we not have a better error message by now. The object knows which script it's looking for. How hard is it to put the name in?!
Your answer