public sealed class SequencePlayerPuts a scene into the state a sequence describes at a time.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Scrubbing and playing are the same operation, which is the decision this class is built around. A player that stepped forward by a delta would give a different answer when scrubbed backwards, and "drag the playhead and watch" is what a sequencer is *for*. So Apply is a pure function of the time: every track is evaluated from its own keys, nothing accumulates, and dragging left is exactly as correct as dragging right.
⚠ Events fire on the interval that was crossed, and that is the one thing a pure evaluation cannot express. An event is not a state, it is a moment — so Apply takes the previous time as well and reports the events strictly between the two. A scrub backwards reports nothing, deliberately: an editor that fired a footstep because somebody dragged the playhead over it would make a scrub audibly different from a play.
⚠ What it changes, it restores. Entering a sequence takes a snapshot of every entity a track names, and Restore puts them back — so scrubbing a cinematic does not leave the level with its actors where the last frame of the shot put them. That is doc 20's own "changes made in play mode are discarded, and the editor says so", applied to the surface that would otherwise break it most quietly.
Fields and properties (6)
public SequenceAsset SequenceThe sequence it plays.
public SceneDocument SceneThe scene it drives.
public float TimeWhere the playhead is, in seconds.
public bool IsActiveWhether the scene is currently being driven.
public string CameraWhich camera the last Apply selected, or empty.
public IReadOnlyList<SequenceSignal> SignalsWhat the last Apply raised.
Methods (7)
public SequencePlayer(SequenceAsset sequence, SceneDocument scene)Starts a player over a sequence and a scene.
public int Begin()Takes the snapshot Restore puts back.
public void Restore()Puts back everything Begin recorded.
public int Apply(float time, float previous = -1)Puts the scene into the state the sequence describes at a time.
public static LocalTransform Transform(SequenceTrackData track, float time)What a transform track says at a time.
public static LocalTransform Read(SequenceKeyData key)One key's ten lanes as a transform, filling anything it does not carry.
public static float[] Write(LocalTransform transform)A transform written as a key's ten lanes.
Used by (4)
- AuthoringTestsVixen.Editor.AssetEditors.Tests
- MilestoneE5TestsVixen.Editor.App.Tests
- SequenceDocumentVixen.Editor.AssetEditors
- SequenceViewVixen.Editor.AssetEditors