I'm trying to make a game with the beginning scene a character selection list. There's also a start button, but I only want it to work if the player selected a player character. The code above is how I'm trying to do it but when I click the start button it always does nothing, even after I clicked on a character. Some help would really be appreciated, thanks! This is my code:
private CharacterSelections chal;
public bool CharacterSelect = false;
public void ClickCharacter()
{
CharacterSelect = true;
}
public void StartGame()
{
if (chal == true)
{
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
}
}
}
↧