Class TransformHelper
- Namespace
- VoxelPlayground.Ragdoll
- Assembly
- GamePlay.dll
public static class TransformHelper
- Inheritance
-
object
TransformHelper
Methods
public static void CollectPrefabData(string path, Dictionary<string, string> prefabPath)
Parameters
path string
prefabPath Dictionary<string, string>
public static string ColsToString(Collider[] cols)
Parameters
cols Collider[]
Returns
- string
public static void CopyAllTransform(Transform tranFrom, Transform tranTo)
Parameters
tranFrom Transform
tranTo Transform
public static int FindClosestPoint(Vector3 dest, Transform[] points, bool ignoreY = true)
Parameters
dest Vector3
points Transform[]
ignoreY bool
Returns
- int
public static Transform FindInChildren(this Transform tran, string name, bool contain = false)
Parameters
tran Transform
name string
contain bool
Returns
- Transform
public static T GetComponentFromRoot<T>(this Transform tobj) where T : Component
Parameters
tobj Transform
Returns
- T
Type Parameters
T
public static void GetOneComponentInEachChild<T>(Transform trans, List<T> list, bool ignoreInactive = true) where T : Component
Parameters
trans Transform
list List<T>
ignoreInactive bool
Type Parameters
T
public static int GetParentDepth(this Transform tobj, Transform checkParent, int depth = 0)
Parameters
tobj Transform
checkParent Transform
depth int
Returns
- int
public static string GetPath(Transform trans)
Parameters
trans Transform
Returns
- string
public static string GetRelativePath(Transform trans, Transform root)
Parameters
trans Transform
root Transform
Returns
- string
public static int IndexOfEquals<T>(T[] array, T target)
Parameters
array T[]
target T
Returns
- int
Type Parameters
T
public static int IndexOfRef<T>(T[] array, T target) where T : class
Parameters
array T[]
target T
Returns
- int
Type Parameters
T
public static Transform ProcessInChildren(this Transform tran, string name, Action<Transform> proc, bool contain = false)
Parameters
tran Transform
name string
proc Action<Transform>
contain bool
Returns
- Transform
public static void RemoveChildren(this Transform t)
Parameters
t Transform
public static void ResetLocalPositionAndRotation(this Transform t)
Parameters
t Transform
public static void ResetLocalTransform(this Transform t)
Parameters
t Transform
public static void ResetTransform(this Transform t)
Parameters
t Transform
public static void SetLayerAll(this Transform tobj, int layer)
Parameters
tobj Transform
layer int