表示テーマ
Component
GameObjectとComponentの個体番号を保持する共通基底
型の情報
- 名前空間:
NEMEngine - 型:
NEMEngine.Component(Class) - 継承元:NEMEngine.Object
AddComponent
csharp
public T AddComponent<T>() where T : ComponentComponentまたはScriptを追加し、操作する参照を返します。
戻り値:T。
GetComponent
csharp
public T? GetComponent<T>() where T : classcomponent access(owner GameObjectへの委譲)
戻り値:T?。
GetComponentInChildren
csharp
public T? GetComponentInChildren<T>(bool includeInactive = false) where T : class子階層から指定型のComponentを探します。
| 引数 | 型 | 既定値 |
|---|---|---|
includeInactive | bool | False |
戻り値:T?。
GetComponentInParent
csharp
public T? GetComponentInParent<T>(bool includeInactive = false) where T : class親階層から指定型のComponentを探します。
| 引数 | 型 | 既定値 |
|---|---|---|
includeInactive | bool | False |
戻り値:T?。
GetComponents
csharp
public T[] GetComponents<T>() where T : class同じGameObjectにある指定型のComponentをすべて取得します。
戻り値:T[]。
GetComponents
csharp
public void GetComponents<T>(List<T> results) where T : class同じGameObjectにある指定型のComponentをすべて取得します。
| 引数 | 型 | 既定値 |
|---|---|---|
results | System.Collections.Generic.List<T> | 必須 |
GetComponentsInChildren
csharp
public T[] GetComponentsInChildren<T>(bool includeInactive = false) where T : class子階層にある指定型のComponentを収集します。
| 引数 | 型 | 既定値 |
|---|---|---|
includeInactive | bool | False |
戻り値:T[]。
GetComponentsInChildren
csharp
public void GetComponentsInChildren<T>(bool includeInactive, List<T> results) where T : class子階層にある指定型のComponentを収集します。
| 引数 | 型 | 既定値 |
|---|---|---|
includeInactive | bool | 必須 |
results | System.Collections.Generic.List<T> | 必須 |
GetComponentsInChildren
csharp
public void GetComponentsInChildren<T>(List<T> results) where T : class子階層にある指定型のComponentを収集します。
| 引数 | 型 | 既定値 |
|---|---|---|
results | System.Collections.Generic.List<T> | 必須 |
GetComponentsInParent
csharp
public T[] GetComponentsInParent<T>(bool includeInactive = false) where T : class親階層にある指定型のComponentを収集します。
| 引数 | 型 | 既定値 |
|---|---|---|
includeInactive | bool | False |
戻り値:T[]。
GetComponentsInParent
csharp
public void GetComponentsInParent<T>(bool includeInactive, List<T> results) where T : class親階層にある指定型のComponentを収集します。
| 引数 | 型 | 既定値 |
|---|---|---|
includeInactive | bool | 必須 |
results | System.Collections.Generic.List<T> | 必須 |
GetHashCode
csharp
public override int GetHashCode()同じ値を検索Keyに使うためのHashを返します。
戻り値:int。
HasComponent
csharp
public bool HasComponent<T>() where T : class指定型のComponentを持つかを調べます。
戻り値:bool。
RemoveComponent
csharp
public void RemoveComponent<T>() where T : Component指定型のComponentを取り除きます。
TryGetComponent
csharp
public bool TryGetComponent<T>(out T component) where T : classComponentを検索し、見つかったかをbool、結果をout引数で返します。
| 引数 | 型 | 既定値 |
|---|---|---|
component | Out T | 必須 |
戻り値:bool。
gameObject
csharp
public GameObject gameObjectこのComponentを所有するGameObjectです。
操作:読取専用。
transform
csharp
public Transform transform所有GameObjectのTransformです。
操作:読取専用。
実行時の扱い
Nativeと接続する操作は、Scriptが実行される有効なWorld内で使用します。破棄したGameObjectやComponentへのアクセスは避けてください。設定Snapshotは取得・編集・反映を1組で扱います。