using System.Collections; using System.Collections.Generic; using UnityEngine; [ExecuteInEditMode] public class shuxing : MonoBehaviour { // Start is called before the first frame update public float Age=1; public List Angle_Obj; bool aa=false; void Start() { } private void OnEnable() { // Angle_Obj.Add(this.gameObject.transform.GetChild(0).gameObject); } //public float Age //{ // get // { // Debug.Log("bbbbbbb" + aaage); // return aaage; // } // set // { // Debug.Log("bbbbbbb"); // aaage = value; // } //} // Update is called once per frame void Update() { Debug.Log(this.gameObject.transform.GetChild(0).gameObject); if (aa == false && this.gameObject.transform.GetChild(0).gameObject != null) { // Angle_Obj.Add(this.gameObject.transform.GetChild(0).gameObject); aa = true; //for (int i = 0; i < Angle_Obj.Count; i++) //{ // Debug.Log(Angle_Obj[i].name); //} } this.gameObject.transform.GetChild(0).transform.localScale = new Vector3(Age, Age, 1); } }