Word Game Builder 2.0.1f2
Reference Manual
Static Public Member Functions | List of all members
WGBExtensions Class Reference

Contains extension methods for various classes. More...

+ Collaboration diagram for WGBExtensions:

Static Public Member Functions

static T GetComponentFromInterface< T > (this GameObject gameObject)
 Gets a component from its interface type. (Extension method) More...
 
static T GetComponentFromInterface< T > (this Component component)
 Gets a component from its interface type. (Extension method) More...
 
static T GetComponentInChildrenFromInterface< T > (this GameObject gameObject)
 Gets a component from its interface type, searching through this GameObject and all children. (Extension method) More...
 
static T GetComponentInChildrenFromInterface< T > (this Component component)
 Gets a component from its interface type, searching through this GameObject and all children. (Extension method) More...
 
static T[] GetComponentsFromInterface< T > (this GameObject gameObject)
 Gets all components from its interface type. (Extension method) More...
 
static T[] GetComponentsFromInterface< T > (this Component component)
 Gets all components from its interface type. (Extension method) More...
 
static T[] GetComponentsInChildrenFromInterface< T > (this GameObject gameObject)
 Gets all components from its interface type, searching through this GameObject and all children. (Extension method) More...
 
static T[] GetComponentsInChildrenFromInterface< T > (this Component component)
 Gets all components from its interface type, searching through this GameObject and all children. (Extension method) More...
 

Detailed Description

Contains extension methods for various classes.

Member Function Documentation

static T GetComponentFromInterface< T > ( this GameObject  gameObject)
inlinestatic

Gets a component from its interface type. (Extension method)

Template Parameters
TThe interface type of the component. Must be an IMonoBehaviour.
Parameters
gameObjectThe GameObject to search.
Returns
The found object as an interface. Returns null if no object was found.
Type Constraints
T :class 
T :IMonoBehaviour 
static T GetComponentFromInterface< T > ( this Component  component)
inlinestatic

Gets a component from its interface type. (Extension method)

Template Parameters
TThe interface type of the component. Must be an IMonoBehaviour.
Parameters
componentThe Component to search.
Returns
The found object as an interface. Returns null if no object was found.
Type Constraints
T :class 
T :IMonoBehaviour 
static T GetComponentInChildrenFromInterface< T > ( this GameObject  gameObject)
inlinestatic

Gets a component from its interface type, searching through this GameObject and all children. (Extension method)

Template Parameters
TThe interface type of the component. Must be an IMonoBehaviour.
Parameters
gameObjectThe GameObject to search.
Returns
The found object as an interface. Returns null if no object was found.
Type Constraints
T :class 
T :IMonoBehaviour 
static T GetComponentInChildrenFromInterface< T > ( this Component  component)
inlinestatic

Gets a component from its interface type, searching through this GameObject and all children. (Extension method)

Template Parameters
TThe interface type of the component. Must be an IMonoBehaviour.
Parameters
componentThe Component to search.
Returns
The found object as an interface. Returns null if no object was found.
Type Constraints
T :class 
T :IMonoBehaviour 
static T [] GetComponentsFromInterface< T > ( this GameObject  gameObject)
inlinestatic

Gets all components from its interface type. (Extension method)

Template Parameters
TThe interface type of the component. Must be an IMonoBehaviour.
Parameters
gameObjectThe GameObject to search.
Returns
An array of found objects, as an interface. Returns an empty array if no objects were found.
Type Constraints
T :class 
T :IMonoBehaviour 
static T [] GetComponentsFromInterface< T > ( this Component  component)
inlinestatic

Gets all components from its interface type. (Extension method)

Template Parameters
TThe interface type of the component. Must be an IMonoBehaviour.
Parameters
componentThe Component to search.
Returns
An array of found objects, as an interface. Returns an empty array if no objects were found.
Type Constraints
T :class 
T :IMonoBehaviour 
static T [] GetComponentsInChildrenFromInterface< T > ( this GameObject  gameObject)
inlinestatic

Gets all components from its interface type, searching through this GameObject and all children. (Extension method)

Template Parameters
TThe interface type of the component. Must be an IMonoBehaviour.
Parameters
gameObjectThe GameObject to search.
Returns
An array of found objects, as an interface. Returns an empty array if no objects were found.
Type Constraints
T :class 
T :IMonoBehaviour 
static T [] GetComponentsInChildrenFromInterface< T > ( this Component  component)
inlinestatic

Gets all components from its interface type, searching through this GameObject and all children. (Extension method)

Template Parameters
TThe interface type of the component. Must be an IMonoBehaviour.
Parameters
componentThe Component to search.
Returns
An array of found objects, as an interface. Returns an empty array if no objects were found.
Type Constraints
T :class 
T :IMonoBehaviour