using System.Collections; using System.Collections.Generic; using Unity.VisualScripting; using UnityEngine; using UnityEngine.UI; public class Panel2 : MonoBehaviour { private Toggle toggle;//角色名是否出现 private Button follow;//跟随查按钮 private Button end;//结束按钮 private Dropdown dropdown; private int optionCount; // 用于存储传入的确定Dropdown选项数量的参数 private List characterCameras; // 存储每个角色的摄像头 private List nameImage; // 存储所有角色标签的子物体 private GameObject peopleposition; // Start is called before the first frame update void Start() { toggle=transform.Find("right/under/Toggle").GetComponent(); toggle.onValueChanged.AddListener(OnToggleValueChanged); toggle.isOn = true; dropdown =transform.Find("left/Dropdown").GetComponent(); follow=transform.Find("left/Follow").GetComponent