Skip to content

MonoBehaviour ​

MonoBehaviourはC# Scriptで使用する型です。下記にゲームコードから利用できる宣言を掲載します。

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

型の情報 ​

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

DestroySelf ​

csharp
protected void DestroySelf()

component access(GetComponent<T>等)はComponent基底が提供する(owner GameObjectへの委譲) 自分の owner GameObject を破棄する

GetHashCode ​

csharp
public override int GetHashCode()

同じ値を検索Keyに使うためのHashを返します。

戻り値:int。

Publish ​

csharp
protected void Publish<T>(in T evt)

現在のイベントを購読先へ通知します。

引数型既定値
evtIn T必須

PublishDeferred ​

csharp
protected void PublishDeferred<T>(in T evt)

イベントを後の通知地点へ予約します。

引数型既定値
evtIn T必須

ScheduleRepeatingTimer ​

csharp
protected TimerHandle ScheduleRepeatingTimer(float intervalSeconds, Action callback)

このScript所有の繰り返しTimerを登録します。

引数型既定値
intervalSecondsfloat必須
callbackSystem.Action必須

戻り値:NEMEngine.TimerHandle。

ScheduleTimer ​

csharp
protected TimerHandle ScheduleTimer(float delaySeconds, Action callback)

Timer(owner=this 紐付け。owner 破棄で自動 cancel)

引数型既定値
delaySecondsfloat必須
callbackSystem.Action必須

戻り値:NEMEngine.TimerHandle。

ScheduleUnscaledTimer ​

csharp
protected TimerHandle ScheduleUnscaledTimer(float delaySeconds, Action callback)

このScript所有の、TimeScaleに依存しないTimerを登録します。

引数型既定値
delaySecondsfloat必須
callbackSystem.Action必須

戻り値:NEMEngine.TimerHandle。

StartCoroutine ​

csharp
protected CoroutineHandle StartCoroutine(IEnumerator routine)

Coroutine(owner=this。owner 破棄 / DLL unload / Play Stop で停止)

引数型既定値
routineSystem.Collections.IEnumerator必須

戻り値:NEMEngine.CoroutineHandle。

StopAllCoroutines ​

csharp
protected void StopAllCoroutines()

このScript所有のCoroutineをすべて停止します。

StopCoroutine ​

csharp
protected bool StopCoroutine(CoroutineHandle handle)

指定したCoroutineを停止します。

引数型既定値
handleNEMEngine.CoroutineHandle必須

戻り値:bool。

Subscribe ​

csharp
protected EventSubscription Subscribe<T>(Action<T> handler)

EventBus(owner=this で購読し、owner 破棄時に自動解除される)

引数型既定値
handlerSystem.Action<T>必須

戻り値:NEMEngine.EventSubscription。

enabled ​

csharp
public bool enabled

runtime の有効/無効。lifecycle multi-pass の同期境界で OnEnable/OnDisable へ反映される。 authoring の ScriptEntry.enabled へは書き戻さない(Play終了で authoring に戻る)

操作:読取・変更。

isActiveAndEnabled ​

csharp
public bool isActiveAndEnabled

owner が active hierarchy にあり、かつ enabled なとき true

操作:読取専用。

実行時の扱い ​

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

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