MyBook/Assets/Scripts/OnePageEnd.cs

25 lines
442 B
C#
Raw Permalink Normal View History

2025-03-17 17:27:32 +08:00
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class OnePageEnd : MonoBehaviour
{
public Button btnEnd;
// Start is called before the first frame update
void Start()
{
btnEnd.onClick.AddListener(OnBbtnEndClick);
}
// Update is called once per frame
void Update()
{
}
private void OnBbtnEndClick()
{
SceneManager.LoadScene(0);
}
}