GameObjectAddComponent Method |
Add a component to this GameObject instance.
Namespace:
GeonBit.ECS
Assembly:
GeonBit (in GeonBit.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public BaseComponent AddComponent(
BaseComponent component,
string name = null
)
Parameters
- component
- Type: GeonBit.ECS.ComponentsBaseComponent
Component to add. - name (Optional)
- Type: SystemString
If provided, will also set the component name while adding it.
Return Value
Type:
BaseComponentThe newly added component.
See Also