- Home /
The associated script cannot be loaded using UI prefab
So I am making a serie of minigames, each one of them in a different scene. I wanted to use the same UI (a menu, a pop up and a button) on all the minigames.
So i made that UI for one game and created a prefab from it, however as soon as I change the scene I am working on, all the UI default scripts in the prefab (canvas script, button script, image script etc) go missing "The associated script cannot be loaded".
My custom scripts are fine however.
I didn't really find any post reporting this problem, did I do something wrong ?
Edit: - I'm working on the project with a friend and he doesn't have the same problem when creating the prefab. I've tried reinstalling Unity but it didn't help.
I did manage to make it work by remaking the prefab from scratch. However my mate modified it on his computer and I retrieved it via git, and I have the missing script problem again.
Partial Solution: It seems the scripts don't go missing if I don't save the scene after creating the prefab. I've been using this for 2 days and so far it seems to work.
Rename it again :p j/k. Anything special about this script? Does the same happen if you try another script? try to narrow down the problem by finding out first if it's being caused by the prefab, or that script. If neither, well, now you know to look somewhere else.
Your answer
Follow this Question
Related Questions
Script Not Working On Prefab 2 Answers
Creating a Prefab and Keeping Original Objects Script Information 0 Answers
Export game objects with mesh paths 0 Answers
[Solved][Kinda?]Missing folders and files 1 Answer
Animator is not playing a Playable 2 Answers