mirror of
https://github.com/Project-Redacted/project-hampter.git
synced 2025-05-31 15:53:15 +00:00
Update :3
This commit is contained in:
parent
1f50b3f262
commit
6bbd56a5cf
759 changed files with 269694 additions and 37600 deletions
20
Assets/MainMenuStuffs/ButtonScript.cs
Normal file
20
Assets/MainMenuStuffs/ButtonScript.cs
Normal file
|
@ -0,0 +1,20 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class ButtonScript : MonoBehaviour
|
||||
{
|
||||
public Button yourButton;
|
||||
public string nextSceneName;
|
||||
void Start()
|
||||
{
|
||||
Button button = yourButton.GetComponent<Button>();
|
||||
button.onClick.AddListener(OnClick);
|
||||
}
|
||||
|
||||
void OnClick()
|
||||
{
|
||||
SceneManager.LoadScene(nextSceneName); // load the next scene
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue