Beispiel #1
0
 public void ToUntagged()
 {
     //foreach(Transform tran in U_Transform.GetChildren(transform, true))
     foreach (Transform tran in U_Transform.GetChildren(transform, true))
     {
         tran.tag = "Untagged";
     }
 }
Beispiel #2
0
 public void ToPlane()
 {
     //foreach(Transform tran in U_Transform.GetChildren(transform, true))
     foreach (Transform tran in U_Transform.GetChildren(transform, true))
     {
         tran.tag = "plane";
     }
 }
Beispiel #3
0
 public void ChangeChildrenTag()
 {
     //foreach(Transform tran in U_Transform.GetChildren(transform, true))
     foreach (Transform tran in U_Transform.GetChildren(transform, true))
     {
         tran.tag = tarTag;
     }
 }
Beispiel #4
0
        public void ToEquip()
        {
            int i = 0;

            foreach (Transform tran in U_Transform.GetChildren(transform, true))
            {
                i++;
                tran.tag = "equip";
            }
            Debug.Log(i + "   个物体改tag为【equip】");
        }
Beispiel #5
0
        //获取组件
        public static List <T> GetTComponent <T>(Transform tran, WE_TransformRange transformRange = WE_TransformRange.Self)
        {
            List <T> tC = new List <T>();

            switch (transformRange)
            {
            case WE_TransformRange.Self: tC.Add(tran.GetComponent <T>()); break;

            case WE_TransformRange.SelfSon: GetTC_FromTransforms <T>(U_Transform.GetSonS(tran, true)); break;

            case WE_TransformRange.SelfChildren: tC = GetTC_FromTransforms <T>(U_Transform.GetChildren(tran, true)); break;

            case WE_TransformRange.SelfBrother: tC = GetTC_FromTransforms <T>(U_Transform.GetBrotherS(tran, true)); break;

            case WE_TransformRange.Son: tC = GetTC_FromTransforms <T>(U_Transform.GetSonS(tran, false)); break;

            case WE_TransformRange.Children: GetTC_FromTransforms <T>(U_Transform.GetChildren(tran, false)); break;

            case WE_TransformRange.Brother: tC = GetTC_FromTransforms <T>(U_Transform.GetBrotherS(tran, false)); break;
            }
            return(tC);
        }
Beispiel #6
0
 void GetChildren()
 {
     children = U_Transform.GetChildren(transform);
 }
 public static List <Transform> GetChildren(this Transform transform, bool isContainSelf = false)
 {
     return(U_Transform.GetChildren(transform, isContainSelf));
 }