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