public void GotoNextMenu() { //Get the next menu but go back to zero if its the last one. int nextMenuNum = ((int)currentMenu + 1) % 5; currentMenu = (MainMenus)nextMenuNum; menuAnimator.SetTrigger(currentMenu.ToString().ToLower()); }