GameObjectGetComponentCompType Method |
Get component by type / name.
Namespace:
GeonBit.ECS
Assembly:
GeonBit (in GeonBit.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public CompType GetComponent<CompType>(
string name = null
)
where CompType : BaseComponent
Parameters
- name (Optional)
- Type: SystemString
If provided, will get component by type and name.
Type Parameters
- CompType
- Type of component to get.
Return Value
Type:
CompTypeFirst component found of this type, or null if couldn't find.
See Also