- Home /
UI components have missing scripts
In my current project, when I add a UI object (e.g. by GameObject > UI > EventSystem) it gets initialized without scripts.
I therefore get errors which say "The referenced script on this Behaviour is missing!", but I cannot select them because they are not in my Assets folder.
The problem doesn't occur when I start a new project, which leads me to believe something went wrong when I cloned the current project from a repository.
I've got the idea the problem has to do with locating UnityEngine.UI.dll, but how can I tell the Unity project where to look for it?
version: Unity 5.0
OS: Windows 7
Thanks for finding the workaround guys, I still have the same problem on unity 5.1.2f with only one version of Unity3d installed, it's driving me nuts losing my UI every couple of loads. The project is 8GB so sending a bug report to Unity is one long upload. Hoping some unity devs out there are reading this and have an idea when it might be fixed
Answer by Angelorf · Apr 03, 2015 at 05:22 PM
Deleting the Library folder did the trick!
Thanks to the forum post "UnityEngine.UI.dll is in timestamps but is not known in assetdatabase"
Answer by UNZoOM · Apr 03, 2015 at 04:55 PM
Click on gear icon and remove component.
Inspector -> Click on Add Component Button -> Type in Standalone and select the Standalone Input Module. Do similary with other missing scripts.
So , instead of trying to find the scripts , just add the Module as a whole.
In case you cannot see which components are missing :
Standalone Input Module
Touch Input Module
Event System
It cannot find 'Standalone Input $$anonymous$$odule' or the others...
Answer by Helical · Jun 07, 2015 at 01:14 PM
We had an issue with a couple of people in our company, I believe its caused by having multiple instances of Unity installed somehow, those of us who only have one Unity installed (because each instalation we override the previous) never had that issue. and when one of us had the problem uninstalling an unused version of unity fixed the problem.
Answer by UnitedBluff · Apr 17, 2016 at 10:37 PM
I don't have an answer for this, and I couldn't find a solution. It happened 3 times, for no apparent reason, with medium sized scenes, and boy, was it a nightmare to string everything together again. I realized what catastrophe it would be if it happened in a huge game with 10-20 levels..imagine a game you've been working on for 2 years day and night..it would take you at least months to fix. Anyway, I realized that I can't use trust the editor anymore, so I simply set everything up in code. Not the best "solution" but what else to do ?
Answer by moleary45 · Jul 29, 2016 at 12:32 PM
My particular case of UI components missing script references only occurred in Xcode (not Unity editor) and involved the use of Asset Bundle Variants.
I found that Unity-authored scripts (e.g. Canvas, Canvas Scaler, Graphic Raycaster, Image) that are not used in the bootstrap scene cannot be loaded in the variant scene when running on iOS via xCode. You get a "The referenced script on this Behaviour is missing!". There is also a corresponding message that does indicate the Unity Game Object whose Unity-authored script cannot be loaded, but I'm documenting this after I found a resolution and don't recall the message. I encountered this scenario for GUI components: Canvas, Panel, Image, EventSystem.
To resolve this, I created a dummy GUI component in the bootstrap scene for each GUI component that I use in the variant scene and made them non-visible by settings their sizes to 0. It's interesting that Unity has no issue loading scripts I author in the variant scene which are not present in the bootstrap scene, but somehow can't do this for its own scripts.
Your answer
![](https://koobas.hobune.stream/wayback/20220613192104im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Gui logic problem 1 Answer
UnityEngine.dll outside Unity 0 Answers
DLL placement 1 Answer
Is that a resolution-related issue? 1 Answer
Java code not working. LOST PROJECT 1 Answer