I had buttons working previously, but recently it appears to have stopped working and I am unclear as to why. Essentially the changes include, updating to 2017.1, and implementing a singleton to persist my level manager.
I went through trying to troubleshoot the level manager, but eventually just copied the code into a new script and tore out all of the singleton functions, created a new scene with a single canvas and button and level manager game object and applied it directly.
However even this has failed to correct the lack of function execution, even Debug.Log(“help im stuck”); fails to execute.
Hoping someone can point out where i have gone wrong here.
i have also noticed that my current UI doesn’t seem to match the documentation, did they update the OnClick UI in 2017.1?
the script for the level manager test is:
using UnityEngine;
using UnityEngine.SceneManagement;
public class lvlmgr2test : MonoBehaviour {
public void ContinueGame(){
Debug.Log ("Continueing last game");
Debug.Log("what the?");
SceneManager.LoadScene("Game");
}
}
and the button looks like: