logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Namespace Serenity.CutscenePlayer.Infrastructure.Services

    Classes

    UnityCutscenePlayerService

    Unity cutscene player service providing cutscene-specific playback API.
    Executes timed stages directly using ITimedSequenceStage.DurationSeconds.

    CutscenePlayer is a first-class vertical aggregate, NOT legacy. It provides cutscene authoring, tooling, and UX on top of the generic SequencePlayer orchestration foundation.

    NOTE: This service does NOT delegate to UnitySequencePlayerService. It executes stages directly because CutscenePlayer owns timed orchestration. RigPrefab is owned by CutscenePlayer, NOT by generic SequencePlayer.

    Bounded-wait contract (Slice W): every wait path in this service has a hard upper bound enforced via either Delay(TimeSpan, CancellationToken) against a sanitized duration, or a wall-clock-driven loop against UnityEngine.Time.realtimeSinceStartup. No code path waits for a Unity callback (UnityEngine.Playables.PlayableDirector.stopped, UnityEngine.Time.unscaledDeltaTime tick) without also racing it against a finite timeout. This is required for WebGL where PlayableDirector.stopped may not fire reliably for some timeline shapes, AudioContext suspension can stall the main update loop, and a hung cutscene would otherwise block the entire initialization pipeline indefinitely.

    UnityCutscenePlayerServiceFactory

    Unity-specific factory for creating cutscene player services with GameObject integration.

    Cutscene is a domain-specific specialization of the generic Sequence system. This factory implements ICutscenePlayerServiceFactory (which extends ISequencePlayerServiceFactory) and provides cutscene-specific service creation with Unity GameObject integration.

    In this article
    © 2026 Serenity. All Rights Reserved