Animator is a component that's used to play [[Type:Animation|Animation]] and drive a list of fields using the contained animation data. The order and type of said fields is determined by the [[Type:Animation|Animation]] in the <code>Clip</code> field, and the value sampled from the [[Type:Animation|Animation]] for any field (<code>Fields</code>) is determined by the [[Type:Animation|Animation]]'s sampled value at the position the <code>_playback</code> is currently at. Sampling is determined by the type of [[Type:Animation|Animation]] <code>Clip</code> is.
|_playback|{{RootFieldType|SyncPlayback}}|TypeAdv0=true| Is populated by the length and properties of <code>Clip</code> and is used to determine what point at which to sample the <code>Clip</code>.
|Clip|{{RootFieldType|AssetRef`1|[[Type:Animation|Animation]]}}|TypeAdv1=true| An [[Type:Animation|Animation]] used to determine the list of <code>Fields</code> on this component and their value/ref types.
|Fields|{{RootFieldType|SyncList`1|[[Type:DriveRef`1|DriveRef`1]]<[[Type:IField|IField]]>}}|TypeAdv2=true| the list of values stored in this animation. Each field and it's type/animation data is determined by track index order.
}}
}}
Line 15:
Line 15:
== Examples ==
== Examples ==
This is generated by the GLTF and FBX importers when a file with animation data is imported. Any extra animations that don't fit into the animator (EX: NLA tracks from Blender3D) when the animation is imported is put as a component attached to the AssetSlot for the file that is generated by the importer while importing.
Animator is a component that's used to play Animation and drive a list of fields using the contained animation data. The order and type of said fields is determined by the Animation in the Clip field, and the value sampled from the Animation for any field (Fields) is determined by the Animation's sampled value at the position the _playback is currently at. Sampling is determined by the type of AnimationClip is.
the list of values stored in this animation. Each field and it's type/animation data is determined by track index order.
Behavior
Examples
This is generated by the GLTF and FBX importers when a file with animation data is imported. Any extra animations that don't fit into the animator (EX: NLA tracks from Blender3D) when the animation is imported is put as a component attached to the AssetSlot for the file that is generated by the importer while importing.