◆ AddComponentAppropriately< T >()

static T AddComponentAppropriately< T > ( this GameObject  objectToAddComponent)
static
Template Parameters
Tthe type of component to be added
Parameters
objectToAddComponentthe GameObject to which the component should be added
Returns
the newly added component
Type Constraints
T :UnityEngine.Component