表示テーマ
Time
gameplay 時間。値は native の frame context / time service が保持し、ここでは cached frame 値を読むだけ。 hot path で reflection / JSON / file I/O を行わない。scaled と unscaled を明確に分離する。
型の情報
- 名前空間:
NEMEngine - 型:
NEMEngine.Time(Class)
deltaTime
csharp
public static float deltaTimetime scale 適用後のフレーム間秒数(TimeScale=0 で 0 になる)
操作:読取専用。
fixedDeltaTime
csharp
public static float fixedDeltaTime固定ステップ間隔。値は time scale に依らず一定(scale は substep 回数側に反映される)
操作:読取専用。
fixedUnscaledDeltaTime
csharp
public static float fixedUnscaledDeltaTimeTimeScaleを掛ける前の固定時間刻みです。
操作:読取専用。
frameCount
csharp
public static int frameCountPlay 開始からの advance フレーム数
操作:読取専用。
time
csharp
public static float timeフレーム先頭の経過秒数
操作:読取専用。
timeAsDouble
csharp
public static double timeAsDoublePlay 開始からの経過秒数(scaled / unscaled)
操作:読取専用。
timeScale
csharp
public static float timeScale全体時間スケール。0 で pause 相当。負値/NaN/infinity は native 側で安全に丸められる。 set しても authoring(TimeScaleComponent)へは書き戻さない(runtime 専用)。
操作:読取・変更。
unscaledDeltaTime
csharp
public static float unscaledDeltaTimetime scale を無視したフレーム間秒数(pause 中も実時間で進む)
操作:読取専用。
unscaledTime
csharp
public static float unscaledTimeTimeScaleに依存しない経過秒数です。
操作:読取専用。
unscaledTimeAsDouble
csharp
public static double unscaledTimeAsDoubleTimeScaleに依存しない時間をdoubleで取得します。
操作:読取専用。
実行時の扱い
Nativeと接続する操作は、Scriptが実行される有効なWorld内で使用します。破棄したGameObjectやComponentへのアクセスは避けてください。設定Snapshotは取得・編集・反映を1組で扱います。