Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Static Public Member Functions | List of all members
TransformExtension Class Reference

Static Public Member Functions

static Transform FindChild (this Transform t, string childName)
 Finds the first transform of a given name in the child hierarchy, does not check if child is active or not. More...
 
static Transform FindChild (this Transform t, string childName, bool findActiveChild)
 Finds the first transform of a given name in the child hierarchy, can check if child is active or not. More...
 
static Transform FindParent (this Transform t, string parentName, bool findActiveParent)
 Finds the first transform of a given name in the parent hierarchy, can check if the parent is active or not. More...
 
static void NestToParent (this Transform t, Transform newParent)
 Sets parent and resets the transform afterwards (local pos and local rot set to zero) More...
 
static void NestToParent (this Transform t, Transform newParent, bool resetParent)
 Resets the parent and resets the transform afterwards (local pos and local rot set to zero) More...
 
static void SetLayerRecursive (this Transform root, int layer)
 
static void SetShader (this Transform root, string shader)
 Sets the shader on a given transform's renderers and their children More...
 

Member Function Documentation

static Transform TransformExtension.FindChild ( this Transform  t,
string  childName 
)
inlinestatic

Finds the first transform of a given name in the child hierarchy, does not check if child is active or not.

Parameters
tParent transform to search from.
childNameChild's gameobject name we want to find.
static Transform TransformExtension.FindChild ( this Transform  t,
string  childName,
bool  findActiveChild 
)
inlinestatic

Finds the first transform of a given name in the child hierarchy, can check if child is active or not.

Parameters
tParent transform to search from.
childNameChild's gameobject name we want to find.
findActiveChildTrue for returning the first active child found.
Returns
static Transform TransformExtension.FindParent ( this Transform  t,
string  parentName,
bool  findActiveParent 
)
inlinestatic

Finds the first transform of a given name in the parent hierarchy, can check if the parent is active or not.

Parameters
tChild Transform to search from.
parentNameParent's gameobject name we want to find.
findActiveParentTrue for returning the first active parent found.
Returns
static void TransformExtension.NestToParent ( this Transform  t,
Transform  newParent 
)
inlinestatic

Sets parent and resets the transform afterwards (local pos and local rot set to zero)

static void TransformExtension.NestToParent ( this Transform  t,
Transform  newParent,
bool  resetParent 
)
inlinestatic

Resets the parent and resets the transform afterwards (local pos and local rot set to zero)

static void TransformExtension.SetLayerRecursive ( this Transform  root,
int  layer 
)
inlinestatic
static void TransformExtension.SetShader ( this Transform  root,
string  shader 
)
inlinestatic

Sets the shader on a given transform's renderers and their children


The documentation for this class was generated from the following file: