GetComponent
GetComponent(string, Component)
Description
Get the value of the Component type.
Parameters
Parameter Name | Description |
---|---|
name | Name. |
defaultValue | Default value. It is returned when there is no parameter. |
Returns
The true when there parameters of the specified name.
GetComponent(int, Component)
Description
Get the value of the Component type.
Parameters
Parameter Name | Description |
---|---|
id | ID. |
defaultValue | Default value. It is returned when there is no parameter. |
Returns
The true when there parameters of the specified name.
GetComponent<TComponent>(string, TComponent)
public TComponent GetComponent<TComponent>(string name, TComponent defaultValue) ;
Description
Get the value of the Component type.
Type Parameters
Type Parameter Name | Description | Type Constraints |
---|---|---|
TComponent | Type of Component to get |
Parameters
Parameter Name | Description |
---|---|
name | Name. |
defaultValue | Default value. It is returned when there is no parameter. |
Returns
The value of the parameter. If there is no parameter, it returns defaultValue.
GetComponent<TComponent>(int, TComponent)
public TComponent GetComponent<TComponent>(int id, TComponent defaultValue) ;
Description
Get the value of the Component type.
Type Parameters
Type Parameter Name | Description | Type Constraints |
---|---|---|
TComponent | Type of Component to get |
Parameters
Parameter Name | Description |
---|---|
id | ID. |
defaultValue | Default value. It is returned when there is no parameter. |
Returns
The value of the parameter. If there is no parameter, it returns defaultValue.