using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; //md FUCK everthing //史山,别学 public class mainBTN : MonoBehaviour { public GameObject mainPanel; private RectTransform mainPanelRect; public GameObject BTN_0; public GameObject BTN_1; public GameObject BTN_2; public GameObject BTN_3; public GameObject BTN_0_0; public GameObject BTN_1_1; public GameObject BTN_2_2; public GameObject BTN_3_3; // Start is called before the first frame update void Start() { // 确保mainPanel不为空 if (mainPanel == null) { Debug.LogError("mainPanel is not assigned!"); return; } mainPanelRect = mainPanel.GetComponent(); // 添加按钮点击事件 BTN_0.GetComponent