AddComponent

public Component AddComponent(GameObject gameObject, Type type) ;

Add component.

Parameter Name Description
gameObject GameObject
type Component type

Component