Skip to content

Animator ​

AnimationClipをGroupとStateへ登録し、プロパティAnimationを再生します。

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

型の情報 ​

ClipDuration ​

csharp
public float ClipDuration

現在のClipの長さです。単位は秒です。

操作:読取専用。

対応するInspector:AnimationPlayer。

CrossFade ​

csharp
public void CrossFade(string stateName, float normalizedTransitionDuration, int layer = -1, float normalizedTimeOffset = -Infinity)

指定した再生へフェードで切り替えます。

引数型既定値
stateNamestring必須
normalizedTransitionDurationfloat必須
layerint-1
normalizedTimeOffsetfloat-Infinity

CrossFadeInFixedTime ​

csharp
public void CrossFadeInFixedTime(string stateName, float fixedTransitionDuration, int layer = -1, float fixedTimeOffset = 0)

フェード秒数を指定してAnimation Groupを切り替えます。

引数型既定値
stateNamestring必須
fixedTransitionDurationfloat必須
layerint-1
fixedTimeOffsetfloat0

CurrentGroup ​

csharp
public string CurrentGroup

現在再生中のGroup名です。

操作:読取専用。

対応するInspector:AnimationPlayer。

DefaultGroup ​

csharp
public string DefaultGroup

再生開始時に選ばれるGroup名です。

操作:読取・変更。

対応するInspector:AnimationPlayer。

DirectClipRequest ​

csharp
public AnimationClip? DirectClipRequest

Groupを経由せず再生するClip参照です。

操作:読取・変更。

対応するInspector:AnimationPlayer。

Finished ​

csharp
public bool Finished

再生完了状態を取得します。

操作:読取専用。

対応するInspector:AnimationPlayer。

FromEntity ​

csharp
public static Animator FromEntity(GameObject gameObject)

既にComponentを持つGameObjectから操作用の参照を作ります。Componentを追加する操作ではありません。

引数型既定値
gameObjectNEMEngine.GameObject必須

戻り値:NEMEngine.Animator。

GetCurrentAnimatorStateInfo ​

csharp
public AnimatorStateInfo GetCurrentAnimatorStateInfo(int layerIndex)

現在のAnimation再生時刻やGroup名を取得します。

引数型既定値
layerIndexint必須

戻り値:NEMEngine.AnimatorStateInfo。

GetGroups ​

csharp
public IReadOnlyList<AnimationGroupSettings> GetGroups()

GroupとStateの設定Snapshotを取得します。

戻り値:System.Collections.Generic.IReadOnlyList<NEMEngine.AnimationGroupSettings>。

IsPlaying ​

csharp
public bool IsPlaying

指定名のAnimationなどが再生中かを調べます。

操作:読取専用。

IsPlayingValue ​

csharp
public bool IsPlayingValue

再生中かを取得します。

操作:読取専用。

対応するInspector:AnimationPlayer。

Looping ​

csharp
public bool Looping

現在の再生がループするかを取得します。

操作:読取専用。

対応するInspector:AnimationPlayer。

NormalizedFade ​

csharp
public bool NormalizedFade

フェード時間を正規化した値として扱うかを指定します。

操作:読取・変更。

対応するInspector:AnimationPlayer。

NormalizedOffset ​

csharp
public bool NormalizedOffset

開始位置を0〜1の正規化時間として扱うかを指定します。

操作:読取・変更。

対応するInspector:AnimationPlayer。

NormalizedTimeValue ​

csharp
public float NormalizedTimeValue

現在のClip内時刻を0〜1で表した値です。

操作:読取専用。

対応するInspector:AnimationPlayer。

Play ​

csharp
public void Play(string stateName, int layer = -1, float normalizedTime = -Infinity)

指定した再生を開始または再開します。

引数型既定値
stateNamestring必須
layerint-1
normalizedTimefloat-Infinity

PlayClip ​

csharp
public void PlayClip(AnimationClip clip, float normalizedTime = 0)

保存済みグループを変更せずに単独Clipを再生

引数型既定値
clipNEMEngine.AnimationClip必須
normalizedTimefloat0

PlayFade ​

csharp
public float PlayFade

再生切替時のフェード秒数です。

操作:読取・変更。

対応するInspector:AnimationPlayer。

PlayOnStart ​

csharp
public bool PlayOnStart

Play開始時に自動再生します。

操作:読取・変更。

対応するInspector:AnimationPlayer。

PlayRequest ​

csharp
public string PlayRequest

次の更新で再生するGroup名を要求します。

操作:読取・変更。

対応するInspector:AnimationPlayer。

PlaybackTimeRequest ​

csharp
public float PlaybackTimeRequest

再生またはSeekに使う時刻です。

操作:読取・変更。

対応するInspector:AnimationPlayer。

RepeatCount ​

csharp
public int RepeatCount

現在の繰り返し回数です。

操作:読取専用。

対応するInspector:AnimationPlayer。

Seek ​

csharp
public void Seek(float normalizedTime)

移動した区間のAnimation Eventは発火しない

引数型既定値
normalizedTimefloat必須

SeekRequest ​

csharp
public bool SeekRequest

指定時刻への移動を要求します。

操作:読取・変更。

対応するInspector:AnimationPlayer。

SetGroups ​

csharp
public void SetGroups(IEnumerable<AnimationGroupSettings> groups)

編集したGroup一覧をAnimatorへ反映します。

引数型既定値
groupsSystem.Collections.Generic.IEnumerable<NEMEngine.AnimationGroupSettings>必須

Stop ​

csharp
public void Stop()

再生を停止します。Particleでは既存粒子を残すかも引数で選べます。

StopRequest ​

csharp
public bool StopRequest

停止を要求します。

操作:読取・変更。

対応するInspector:AnimationPlayer。

componentTypeID ​

csharp
public static int componentTypeID

組み込みComponentの接続識別子です。通常のゲームコードではGetComponentで取得します。

操作:読取専用。

enabled ​

csharp
public bool enabled

このComponentの処理を有効にします。GameObject全体のアクティブ状態とは別です。

操作:読取・変更。

対応するInspector:AnimationPlayer。

speed ​

csharp
public float speed

全GroupのAnimation時刻に掛ける再生倍率です。

操作:読取・変更。

対応するInspector:AnimationPlayer。

実行時の扱い ​

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

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