eva.js.gameobject.addcomponent_1
Home > @eva/eva.js > GameObject > addComponent
GameObject.addComponent() method
Signature:addComponent<T extends Component<ComponentParams>>(C: ComponentConstructor<T>, obj?: ComponentParams): T;
Parameters
Parameter | Type | Description |
---|---|---|
C | ComponentConstructor<T> | |
obj | ComponentParams |
T