UI Button Not Working

I have a series of levels which I’ve made as scenes, and I don’t have anything to switch between them yet. In this i have a try again button, but it seems to only work on some scenes and not others. This makes little sense, because the buttons in the different scenes use identical scripts and have identical settings, positions in the hierarchy, etc. The canvases also are in identical positions and have identical settings, and in both scenes I have an EventSystem. I have considered it might somehow be because there’s another button in the same place as the try again button, but it doesn’t seem to affect it on the other script and i can’t think of anything as a fix for a problem like that. Any ideas?

  1. Create an Empty
  2. Add A c# script
  3. Delete void start and void update
  4. Add
    public void ChangeScene (int sceneToChangeTo) %|-2064817035_1|% Application.LoadLevel(sceneToChangeTo); }
  5. go to your button
  6. click +
  7. drag and drop your empty with the script to the on click() Event
  8. Click on No Funktion
  9. Select Script Name
  10. Select Change Scene Int
  11. Go to your build Setting put in your Scenes and at the right you can see the Scene values
  12. go to your button and set the value of the next side/scene

I ended up resolving it by just having the buttons move in from off screen when needed, it appears that them being on top of each other was a probem even though they were in different canvases.