Skip to content

Component ​

GameObjectとComponentの個体番号を保持する共通基底

使い方と前提条件 · C# API一覧

型の情報 ​

  • 名前空間:NEMEngine
  • 型:NEMEngine.Component(Class)
  • 継承元:NEMEngine.Object

AddComponent ​

csharp
public T AddComponent<T>() where T : Component

ComponentまたはScriptを追加し、操作する参照を返します。

戻り値:T。

GetComponent ​

csharp
public T? GetComponent<T>() where T : class

component access(owner GameObjectへの委譲)

戻り値:T?。

GetComponentInChildren ​

csharp
public T? GetComponentInChildren<T>(bool includeInactive = false) where T : class

子階層から指定型のComponentを探します。

引数型既定値
includeInactiveboolFalse

戻り値:T?。

GetComponentInParent ​

csharp
public T? GetComponentInParent<T>(bool includeInactive = false) where T : class

親階層から指定型のComponentを探します。

引数型既定値
includeInactiveboolFalse

戻り値: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をすべて取得します。

引数型既定値
resultsSystem.Collections.Generic.List<T>必須

GetComponentsInChildren ​

csharp
public T[] GetComponentsInChildren<T>(bool includeInactive = false) where T : class

子階層にある指定型のComponentを収集します。

引数型既定値
includeInactiveboolFalse

戻り値:T[]。

GetComponentsInChildren ​

csharp
public void GetComponentsInChildren<T>(bool includeInactive, List<T> results) where T : class

子階層にある指定型のComponentを収集します。

引数型既定値
includeInactivebool必須
resultsSystem.Collections.Generic.List<T>必須

GetComponentsInChildren ​

csharp
public void GetComponentsInChildren<T>(List<T> results) where T : class

子階層にある指定型のComponentを収集します。

引数型既定値
resultsSystem.Collections.Generic.List<T>必須

GetComponentsInParent ​

csharp
public T[] GetComponentsInParent<T>(bool includeInactive = false) where T : class

親階層にある指定型のComponentを収集します。

引数型既定値
includeInactiveboolFalse

戻り値:T[]。

GetComponentsInParent ​

csharp
public void GetComponentsInParent<T>(bool includeInactive, List<T> results) where T : class

親階層にある指定型のComponentを収集します。

引数型既定値
includeInactivebool必須
resultsSystem.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 : class

Componentを検索し、見つかったかをbool、結果をout引数で返します。

引数型既定値
componentOut T必須

戻り値:bool。

gameObject ​

csharp
public GameObject gameObject

このComponentを所有するGameObjectです。

操作:読取専用。

transform ​

csharp
public Transform transform

所有GameObjectのTransformです。

操作:読取専用。

実行時の扱い ​

Nativeと接続する操作は、Scriptが実行される有効なWorld内で使用します。破棄したGameObjectやComponentへのアクセスは避けてください。設定Snapshotは取得・編集・反映を1組で扱います。

現行版マニュアル · 8ea58ba2 · 2026-10-28確認