public sealed class VideoSystemAdvances every video in a world, once a frame.
No guide page documents this yet — the page shows what the code says about itself.
As a system
- Phase
- Update
- Writes
- VideoPlaybackInfo VideoSurface
Remarks
Small on purpose. The decoding happens on the player's own thread and the choosing of a frame happens in Update; what this adds is that the set of videos being advanced is a query rather than a list somebody maintains, so a cutscene entity that is spawned starts playing and one that is destroyed stops.
It runs in Update, before anything that draws. The picture chosen here is uploaded in PreRender and drawn in Render, all within the frame — which is what makes VideoPlayer.CurrentFrame's "valid until the next update" contract safe to rely on.
The delta is the game's, not the wall clock's. A video in a paused game pauses and a video in a slow-motion game runs slowly, because the clock it advances is fed context.Time.DeltaSeconds. A video with an audio track ignores all of this and follows the sound — see VideoClock.Master.
Fields and properties (1)
public SystemAccess Access
Methods (2)
public override JobHandle Update(in SystemContext context, JobHandle dependency)Runs the system.
public void Step(World world, TimeSpan delta)Advances every video in a world.
Used by (1)
- VideoSystemTestsVixen.Video.Tests