using System.Collections; using System.Collections.Generic; using Unity.VisualScripting; using UnityEngine; using UnityEngine.UI; using System.Threading.Tasks; public class Panel2 : MonoBehaviour { private Toggle toggle;//角色名是否出现 private Button follow;//跟随查按钮 private Button end;//结束按钮 private Dropdown dropdown; private int optionCount; // 用于存储传入的确定Dropdown选项数量的参数 private List nameImage; // 存储所有角色标签的子物体 private GameObject peopleposition; public Camera godView; // 上帝视角的位置 private bool isGodView = true; // 是否为上帝视角 // Start is called before the first frame update void Start() { godView=GameObject.Find("TopCamera").GetComponent(); 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