- Home /
Problems with to many buttons
I have over 50 levels in my new project, and im handling every button in one script. The Problem is, that i need to connect every 50 buttons to each of the buttons. That means i need to connect all 50 buttons in the Inspector to the Level 1 button, i need to connect all the 50 buttons in the Inspector to the level 2 button and so on. If i only connect the right button so for example level 1 to level 1 and keep the others on None i get this error: NullReferenceException: Object reference not set to an instance of an object LevelButtonController.Start () (at does somebody know how i can do it, that i only need to connect the right button to the right gameobject without creating 50 scripts? I hope i was able to describe it, im from Germany
Thanks:)
You can setup this in one scene and save it as a prefab....then just import it in each scene