My Project
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Static Public Member Functions | List of all members
UniExtensions.GameObjectExtensionMethods Class Reference

Static Public Member Functions

static IEnumerable< GameObject > FindChildren (this GameObject component, string query)
 Returns all child objects whose name contains query. More...
 
static Transform FindTransform (this GameObject component, string query)
 Find the child whose name exactly matches query. More...
 
static GameObject FindChild (this GameObject component, string query)
 Finds the child who's name exactly manages query. More...
 
static Bounds GetBounds (this GameObject g)
 Gets the entire bounds of anything rendered under this game object. More...
 
static GameObject[] Children (this GameObject g)
 Get all direct children of this game object. More...
 
static void SetLayer (this GameObject g, int layer)
 Set this gameobject and all children to a layer. More...
 
static T DefaultComponent< T > (this GameObject G)
 Get a component from a game object, and add it if it is missing. More...
 
static void DestroyChildren (this GameObject go)
 Destroys the children. More...
 
static void DestroyChildrenImmediate (this GameObject go)
 Destroys the children immediately. More...
 

Member Function Documentation

static GameObject [] UniExtensions.GameObjectExtensionMethods.Children ( this GameObject  g)
inlinestatic

Get all direct children of this game object.

Parameters
gA GameObject
Returns
A GameObject[]
static T UniExtensions.GameObjectExtensionMethods.DefaultComponent< T > ( this GameObject  G)
inlinestatic

Get a component from a game object, and add it if it is missing.

Parameters
gA GameObject
Returns
A T
Type Constraints
T :Component 
static void UniExtensions.GameObjectExtensionMethods.DestroyChildren ( this GameObject  go)
inlinestatic

Destroys the children.

Parameters
gThe gameobject.
static void UniExtensions.GameObjectExtensionMethods.DestroyChildrenImmediate ( this GameObject  go)
inlinestatic

Destroys the children immediately.

Parameters
gThe gameobject.
static GameObject UniExtensions.GameObjectExtensionMethods.FindChild ( this GameObject  component,
string  query 
)
inlinestatic

Finds the child who's name exactly manages query.

Returns
The child.
Parameters
componentComponent.
queryQuery.
static IEnumerable<GameObject> UniExtensions.GameObjectExtensionMethods.FindChildren ( this GameObject  component,
string  query 
)
inlinestatic

Returns all child objects whose name contains query.

Parameters
componentA GameObject
queryA System.String
Returns
A IEnumerable(GameObject)
static Transform UniExtensions.GameObjectExtensionMethods.FindTransform ( this GameObject  component,
string  query 
)
inlinestatic

Find the child whose name exactly matches query.

Parameters
componentA GameObject
queryA System.String
Returns
A GameObject
static Bounds UniExtensions.GameObjectExtensionMethods.GetBounds ( this GameObject  g)
inlinestatic

Gets the entire bounds of anything rendered under this game object.

Returns
The bounds.
Parameters
gG.
static void UniExtensions.GameObjectExtensionMethods.SetLayer ( this GameObject  g,
int  layer 
)
inlinestatic

Set this gameobject and all children to a layer.

Parameters
gA GameObject
layerA System.Int32

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