Table of Contents

Class TransformHelper

Namespace
VoxelPlayground.Ragdoll
Assembly
GamePlay.dll
public static class TransformHelper
Inheritance
object
TransformHelper

Methods

CollectPrefabData(string, Dictionary<string, string>)

public static void CollectPrefabData(string path, Dictionary<string, string> prefabPath)

Parameters

path string
prefabPath Dictionary<string, string>

ColsToString(Collider[])

public static string ColsToString(Collider[] cols)

Parameters

cols Collider[]

Returns

string

CopyAllTransform(Transform, Transform)

public static void CopyAllTransform(Transform tranFrom, Transform tranTo)

Parameters

tranFrom Transform
tranTo Transform

FindClosestPoint(Vector3, Transform[], bool)

public static int FindClosestPoint(Vector3 dest, Transform[] points, bool ignoreY = true)

Parameters

dest Vector3
points Transform[]
ignoreY bool

Returns

int

FindInChildren(Transform, string, bool)

public static Transform FindInChildren(this Transform tran, string name, bool contain = false)

Parameters

tran Transform
name string
contain bool

Returns

Transform

GetComponentFromRoot<T>(Transform)

public static T GetComponentFromRoot<T>(this Transform tobj) where T : Component

Parameters

tobj Transform

Returns

T

Type Parameters

T

GetOneComponentInEachChild<T>(Transform, List<T>, bool)

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

GetParentDepth(Transform, Transform, int)

public static int GetParentDepth(this Transform tobj, Transform checkParent, int depth = 0)

Parameters

tobj Transform
checkParent Transform
depth int

Returns

int

GetPath(Transform)

public static string GetPath(Transform trans)

Parameters

trans Transform

Returns

string

GetRelativePath(Transform, Transform)

public static string GetRelativePath(Transform trans, Transform root)

Parameters

trans Transform
root Transform

Returns

string

IndexOfEquals<T>(T[], T)

public static int IndexOfEquals<T>(T[] array, T target)

Parameters

array T[]
target T

Returns

int

Type Parameters

T

IndexOfRef<T>(T[], T)

public static int IndexOfRef<T>(T[] array, T target) where T : class

Parameters

array T[]
target T

Returns

int

Type Parameters

T

ProcessInChildren(Transform, string, Action<Transform>, bool)

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

RemoveChildren(Transform)

public static void RemoveChildren(this Transform t)

Parameters

t Transform

ResetLocalPositionAndRotation(Transform)

public static void ResetLocalPositionAndRotation(this Transform t)

Parameters

t Transform

ResetLocalTransform(Transform)

public static void ResetLocalTransform(this Transform t)

Parameters

t Transform

ResetTransform(Transform)

public static void ResetTransform(this Transform t)

Parameters

t Transform

SetLayerAll(Transform, int)

public static void SetLayerAll(this Transform tobj, int layer)

Parameters

tobj Transform
layer int