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