i Need a Script That can Handle OnClick function of button when game starts The script add a game Object in which a script is attached the game assign that object to button OnClick section and Select the functionality of nextScene and previous scene
previousButton.GetComponent<Button>().onClick.AddListener(PreviousScene);
nextButton.GetComponent<Button>().onClick.AddListener(NextScene);