_xiaofang/xiaofang/Assets/Res/gsj/scripts/VideoBack.cs

25 lines
544 B
C#
Raw Normal View History

2024-12-20 10:10:19 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class VideoBack : MonoBehaviour
{
private Button closeBtn;
// Start is called before the first frame update
void Start()
{
closeBtn=transform.Find("top/Image").GetComponent<Button>();
closeBtn.onClick.AddListener(OnClickCloseBtn);
}
// Update is called once per frame
void Update()
{
}
void OnClickCloseBtn()
{
transform.gameObject.SetActive(false);
}
}