Method GetComponent
GetComponent(Type)
Get a component value.
Declaration
public TComponent GetComponent(Type componentType)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | componentType | The component type. |
Returns
| Type | Description |
|---|---|
| TComponent | The component value if found, throws otherwise. |
GetComponent<T>()
Get a component value.
Declaration
public T GetComponent<T>() where T : TComponent
Returns
| Type | Description |
|---|---|
| T | The component value if found, throws otherwise. |
Type Parameters
| Name | Description |
|---|---|
| T | The component type. |