Exemple #1
0
 public static Component[] FindComponentsWithTagInChildren(this Transform self, Type type, string tagName,
                                                           bool isRecursive = true, bool isStartWith = true)
 {
     return(TransformUtil.FindComponentsWithTagInChildren(self, type, tagName, isRecursive, isStartWith));
 }
Exemple #2
0
 public static Component FindComponentInParent(this Transform self, Type type, string name,
                                               bool isStartWith = true)
 {
     return(TransformUtil.FindComponentInParent(self, type, name, isStartWith));
 }
Exemple #3
0
 public static void SetAlpha(this Transform self, float alpha, bool isRecursive = true)
 {
     TransformUtil.SetAlpha(self, alpha, isRecursive);
 }
Exemple #4
0
 public static (bool, string) GetRelativePath(this Transform self, Transform parentTransform = null)
 {
     return(TransformUtil.GetRelativePath(self, parentTransform));
 }
Exemple #5
0
 public static void AddLocalScaleY(this Transform self, float value)
 {
     TransformUtil.AddLocalScaleY(self, value);
 }
Exemple #6
0
 public static Vector3 GetLossyScaleOfParent(this Transform transform)
 {
     return(TransformUtil.GetLossyScaleOfParent(transform));
 }
Exemple #7
0
 public static void ResetToParent(this Transform self, Transform parentTransform,
                                  TransformMode transformMode =
                                  TransformMode.localPosition | TransformMode.localRotation | TransformMode.localScale)
 {
     TransformUtil.ResetToParent(self, parentTransform, transformMode);
 }
Exemple #8
0
 public static void AddRotationY(this Transform self, float value)
 {
     TransformUtil.AddRotationY(self, value);
 }
Exemple #9
0
 /// <summary>
 /// 从根物体到当前物体的全路径, 以/分隔
 /// </summary>
 public static string GetFullPath(this Transform self, Transform root_transform = null, string separator = StringConst.String_Slash)
 {
     return(TransformUtil.GetFullPath(self, root_transform, separator));
 }
Exemple #10
0
 /// <summary>
 /// 递归设置layer
 /// </summary>
 public static void SetLayerRecursive(this Transform self, int layer)
 {
     TransformUtil.SetLayerRecursive(self, layer);
 }
Exemple #11
0
 /// <summary>
 /// Find子Object,包括Disable的Object也会遍历获取
 /// </summary>
 public static Transform FindChildRecursive(this Transform self, string childName)
 {
     return(TransformUtil.FindChild(self, childName));
 }
Exemple #12
0
 /// <summary>
 /// 销毁子节点
 /// </summary>
 /// <param name="root"></param>
 public static void DestroyChildren(this Transform self)
 {
     TransformUtil.DestroyChildren(self);
 }
Exemple #13
0
 /// <summary>
 /// 获取直接子孩子节点
 /// </summary>
 /// <param name="root"></param>
 /// <returns></returns>
 public static Transform[] Children(this Transform self)
 {
     return(TransformUtil.GetChildren(self));
 }
Exemple #14
0
 public static void AddLocalPositionX(this Transform self, float value)
 {
     TransformUtil.AddLocalPositionX(self, value);
 }
Exemple #15
0
 public static void SetPositionX(this Transform self, float value)
 {
     TransformUtil.SetPositionX(self, value);
 }
Exemple #16
0
 public static void AddLocalEulerAnglesZ(this Transform self, float value)
 {
     TransformUtil.AddLocalEulerAnglesZ(self, value);
 }
Exemple #17
0
 public static void SetLocalEulerAnglesY(this Transform self, float value)
 {
     TransformUtil.SetLocalEulerAnglesY(self, value);
 }
Exemple #18
0
 public static void AddLocalRotationZ(this Transform self, float value)
 {
     TransformUtil.AddLocalRotationZ(self, value);
 }
Exemple #19
0
 /// <summary>
 /// GetName    赋值物体的时候,名字可能出现去掉(),空格等,去掉这些冗余得到的名字
 /// </summary>
 /// <param name="transform"></param>
 /// <returns></returns>
 public static string GetName(this Transform self)
 {
     return(TransformUtil.GetName(self));
 }
Exemple #20
0
 public static void AddLossyScaleZ(this Transform self, float value)
 {
     TransformUtil.AddLossyScaleZ(self, value);
 }
Exemple #21
0
 public static void SetRotationZ(this Transform self, float value)
 {
     TransformUtil.SetRotationZ(self, value);
 }
Exemple #22
0
 public static void SetIsGray(this Transform self, bool isGray, bool isRecursive = true)
 {
     TransformUtil.SetIsGray(self, isGray, isRecursive);
 }
Exemple #23
0
 public static void SetLocalRotationY(this Transform self, float value)
 {
     TransformUtil.SetLocalRotationY(self, value);
 }
Exemple #24
0
 public static void SetColor(this Transform self, Color color, bool isNotUseColorAlpha = false,
                             bool isRecursive = true)
 {
     TransformUtil.SetColor(self, color, isNotUseColorAlpha, isRecursive);
 }
Exemple #25
0
 public static void SetLocalScaleZ(this Transform self, float value)
 {
     TransformUtil.SetLocalScaleZ(self, value);
 }
Exemple #26
0
 public static T[] FindComponentsWithTagInChildren <T>(this Transform self, string tagName,
                                                       bool isRecursive = true,
                                                       bool isStartWith = true) where T : Component
 {
     return(TransformUtil.FindComponentsWithTagInChildren <T>(self, tagName, isRecursive, isStartWith));
 }
Exemple #27
0
 public static void SetLossyScaleY(this Transform self, float value)
 {
     TransformUtil.SetLossyScaleY(self, value);
 }
Exemple #28
0
 public static (bool, string) GetRelativePath(this GameObject self, GameObject parentGameObject = null)
 {
     return(TransformUtil.GetRelativePath(self.transform,
                                          parentGameObject == null ? null : parentGameObject.transform));
 }
Exemple #29
0
 public static T FindComponentInParent <T>(this Transform self, string name, bool isStartWith = true)
     where T : Component
 {
     return(TransformUtil.FindComponentInParent <T>(self, name, isStartWith));
 }