Method TryGetComponent
TryGetComponent(Type, out TComponent)
Try to get the value of a Type component.
Declaration
public bool TryGetComponent(Type type, out TComponent value)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | type | Type of the component. |
| TComponent | value | Out value of the component. |
Returns
| Type | Description |
|---|---|
| bool |
TryGetComponent<T>(out T)
Try to get the value of a T component.
Declaration
public bool TryGetComponent<T>(out T value) where T : TComponent
Parameters
| Type | Name | Description |
|---|---|---|
| T | value | Out value of the component. |
Returns
| Type | Description |
|---|---|
| bool |
Type Parameters
| Name | Description |
|---|---|
| T | Type of the component. |