public void SetScene(string sceneName) { if (!newGameButton || !continueButton) { newGameButton = GetComponentInChildren <StartLevelButton>(); continueButton = GetComponentInChildren <LoadButton>(); } newGameButton.relatedSceneName = sceneName; continueButton.relatedSceneName = sceneName; var newGameUIButton = newGameButton.GetComponent <Button>(); newGameUIButton.Select(); }
public void Start() { newGameButton = GetComponentInChildren <StartLevelButton>(); continueButton = GetComponentInChildren <LoadButton>(); }