Inventory Engine  v4.0
Static Public Member Functions | Static Public Attributes | List of all members
MoreMountains.Tools.GameObjectExtensions Class Reference

Game object extensions More...

Static Public Member Functions

static Component MMGetComponentNoAlloc (this GameObject @this, System.Type componentType)
 Grabs a component without allocating memory uselessly More...
 
static T MMGetComponentNoAlloc< T > (this GameObject @this)
 Grabs a component without allocating memory uselessly More...
 
static T MMGetComponentAroundOrAdd< T > (this GameObject @this)
 Grabs a component on the object, or on its children objects, or on a parent, or adds it to the object if none were found More...
 
static T MMGetOrAddComponent< T > (this GameObject @this)
 Gets the specified component on the object, or adds it and returns it if there isn't already one More...
 

Static Public Attributes

static T newComponent
 Gets the specified component on the object, or adds it and returns it if there isn't already one More...
 

Detailed Description

Game object extensions

Member Function Documentation

◆ MMGetComponentAroundOrAdd< T >()

static T MoreMountains.Tools.GameObjectExtensions.MMGetComponentAroundOrAdd< T > ( this GameObject @  this)
static

Grabs a component on the object, or on its children objects, or on a parent, or adds it to the object if none were found

Parameters
this
Template Parameters
T
Returns
Type Constraints
T :Component 

◆ MMGetComponentNoAlloc()

static Component MoreMountains.Tools.GameObjectExtensions.MMGetComponentNoAlloc ( this GameObject @  this,
System.Type  componentType 
)
static

Grabs a component without allocating memory uselessly

Parameters
this
componentType
Returns

◆ MMGetComponentNoAlloc< T >()

static T MoreMountains.Tools.GameObjectExtensions.MMGetComponentNoAlloc< T > ( this GameObject @  this)
static

Grabs a component without allocating memory uselessly

Template Parameters
T
Parameters
this
Returns
Type Constraints
T :Component 

◆ MMGetOrAddComponent< T >()

static T MoreMountains.Tools.GameObjectExtensions.MMGetOrAddComponent< T > ( this GameObject @  this)
static

Gets the specified component on the object, or adds it and returns it if there isn't already one

Parameters
gameObject
Template Parameters
T
Returns
Type Constraints
T :Component 

Member Data Documentation

◆ newComponent

T MoreMountains.Tools.GameObjectExtensions.newComponent
static

Gets the specified component on the object, or adds it and returns it if there isn't already one

Parameters
gameObject
Template Parameters
T
Returns

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