Class AICommandMixerBehaviour
A timeline mixer behaviour holds the logic for issuing AI commands during playback. It processes and blends data from multiple AICommandBehaviour to produce smooth approximation during Edit mode.
public class AICommandMixerBehaviour : PlayableBehaviour
Inheritance
Methods
OnPlayableDestroy(Playable)
This function is called when the Playable that owns the PlayableBehaviour is destroyed.
It cleans up the mixer and reset any runtime variable in Edit mode.
public override void OnPlayableDestroy(Playable playable)
Parameters
| Name | Type | Description |
|---|---|---|
playable | Playable | The Playable being destroyed. |
ProcessFrame(Playable, FrameData, object)
This function is called during the ProcessFrame phase of the PlayableGraph.
It Processes each frame of the Timeline Playable. Behavior differs depending on whether the application is in Play mode or Edit mode:
- Play Mode Executes actual AI commands, triggering the associated behaviors on the GameObject (e.g., movement).
- Edit Mode Simulates the effect of the AI commands for preview purposes (e.g., visualizing movement), without executing real gameplay logic.
public override void ProcessFrame(Playable playable, FrameData info, object playerData)
Parameters
| Name | Type | Description |
|---|---|---|
playable | Playable | The Timeline Playable being evaluated. |
info | FrameData | Frame-specific information provided by the Playable system. |
playerData | object | The GameObject assigned as the track's binding, typically the AI actor. |