powerfun-unity/Assets/Cyp/DemoScript.cs

25 lines
497 B
C#
Raw Normal View History

2021-03-25 16:55:36 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class DemoScript : MonoBehaviour
{
[SerializeField] Button button;
// Start is called before the first frame update
void Start()
{
button.onClick.AddListener(()=>
{
SceneManager.UnloadSceneAsync("4-Demo");
});
}
// Update is called once per frame
void Update()
{
}
}