using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class CarAttributePanle : ResourceLoadPanel { private Button SureBtn; private Button CloseBtn; private Toggle Select_t; private void Start() { var P_car = GameObject.Find("P_AllParent/P_Car").transform; var cars = P_car.GetComponentsInChildren(); var Father = transform.Find(GlobalVariable.ContentPath); GameObject obj = Resources.Load("UI/CarAttributeItem"); foreach (CarAttributeRecord item in cars) { GameObject clone = Instantiate(obj, Father.transform); clone.GetComponent().CarAttributeRecord = item; clone.name = item.CarType.ToString(); } SureBtn = transform.Find("SureBtn").GetComponent