Hello, I am trying to make a button that will restart my game. When I press the button (screenshot attached) it should call RestartButton() which calls ButtonPushVisual():
public void RestartButton()
{
ButtonPushVisual(restartButton);
SceneManager.LoadScene(SceneManager.GetActiveScene().name);
}
public void ButtonPushVisual(Button button)
{
button.transform.localScale = buttonPushScale;
}
When I press the button, it executes ButtonPushVisual() but not the rest of RestartButton(). I know this because when I put print statements around each statement, it called the ones in ButtonPushVisual() but not any in RestartButton().
I’m not sure what’s wrong with it. I appreciate any help.