- Home /
Button Script is missing after load
So I have a game breaking problem. The thing that happens is that I have a level called bootstrap where music and shit gets initialized, and after 10 seconds it changes to the main menu. That is where the problem lies. When main menu gets loaded all of the scripts that has to do with buttons are missing causing me not to interact with them and being able to start the actual game itself.
"The referenced script on this Behaviour is missing!"
Any sort of help is greatly appreciated.
Answer by sas_88 · May 13, 2015 at 11:20 AM
whether the buttons are in main menu scene or instantiate button from prefab in script during runtime.
If button instantiate from prefab in script during runtime, check the prefab for existence of the script.
If u move the script file to different location in project window after adding the script to gameobject,there is possible of above scenario.
Well the problem is that i don't know where the button script is since it's a default script in unity.
Here tutorial for your question : https://www.youtube.com/watch?v=kQ2Qc_0$$anonymous$$IyI
Look at the Button in the Inspector. There you can see the name of the script.
Once you have the name of the script, you can look it up in the Project Window.
I didn't understand what your problem was. Does your $$anonymous$$ain $$anonymous$$enu Scene work properly, but when you add the scene to your first scene, the buttons don't work anymore. Or were they never working properly in the first place?
Well the unity add button thing in the UI just disappeared without reason so i decided to make my own UI and that works anyways