AddComponent
AddComponent(GameObject, Type)
public static Component AddComponent(GameObject gameObject, Type type) ;
説明
Componentを追加する。
パラメーター
| パラメーター名 | 説明 | 
|---|---|
| gameObject | GameObject | 
| type | Componentの型 | 
戻り値
Component
AddComponent<Type>(GameObject)
public static Type AddComponent<Type>(GameObject gameObject) ;
説明
Componentを追加する。
型パラメーター
| 型パラメーター名 | 説明 | 型制約 | 
|---|---|---|
| Type | Componentの型 | 
  | 
パラメーター
| パラメーター名 | 説明 | 
|---|---|
| gameObject | GameObject | 
戻り値
Component