using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Calendarbtn : MonoBehaviour { public Text when_text;//时间文本 public Button calendar_btn; public RectTransform calendar_panl; public bool isp=true; void Start() { calendar_btn.onClick.AddListener(() => { if (isp==true) { calendar_panl.gameObject.SetActive(true); when_text.gameObject.SetActive(true); } }); } // Update is called once per frame void Update() { } }