GameObject.addComponent

Adds a component to the object.

class GameObject
final
void
addComponent
(
Component newComponent
)
in { assert (newComponent, "Null component added."); }

Meta