using System.Collections; using System.Collections.Generic; using UnityEngine; public class DropdownExpands : MonoBehaviour { [SerializeField] public bool IsExpands { get; private set; } public GameObject arrow; public GameObject arrow1; // Start is called before the first frame update void Start() { if (this.name == "Dropdown List") { //下拉展开了 IsExpands = true; arrow.SetActive(true); arrow1.SetActive(false); } } private void OnDestroy() { //收起了 IsExpands = false; arrow1.SetActive(true); arrow.SetActive(false); } // Update is called once per frame void Update() { } }