APIs and Events
1. Find the Right Class for Your Task
Content Development Task | Primary Entry Point |
|---|---|
Advance to the next Plot, jump to a specific Act / Plot, or switch the narrative scene |
|
Close or open the visual mask, publish synchronous/asynchronous events, or send an in-project request |
|
Respond to playback start, pause, resume, seek, or player-height notifications |
|
Configure Act entrances/exits, Plot boundaries, boundary events, and Plot-advance triggers |
|
Configure multiple vehicles, observe local binding state, and start content animation |
|
Read package type, single-player/multiplayer mode, venue, room, player, and language |
|
Play 360 video, select a playback backend, or synchronize replay video with the recording timeline |
|
Record a Vgen camera shot |
|
2. API Conventions
Convention | Guidance |
|---|---|
| Access manager singletons after SDK initialization. If a scene object's |
|
|
|
|
Time units | Unless stated otherwise, transition, video, and recording times are in seconds. Video seek positions use |
| Narrative navigation returns |
Subscription lifecycle | Keep the same delegate instance and unsubscribe in |
Public does not automatically mean supported | Only members documented on this page form the content-development contract. Other |
3. YomovActManager
Purpose. YomovActManager owns narrative state and advances Acts and Plots, including related Unity scene loads. Use it when content completion, a Timeline Signal, UI interaction, or single-player debugging needs to move the story forward.
Methods
Method | Description |
|---|---|
| Advances to the next Plot in the narrative configuration and loads the target scene when crossing an Act. For multiplayer content that crosses scenes and requires server coordination, pass |
| Loads the target Plot by |
| The parameter is |
| Returns the current Act and Plot names. Returns |
| Checks whether the specified Act belongs to the active Unity scene. Use it before navigation when you need to determine whether a scene change is required. |
Runtime State and Narrative Callbacks
Member | Description |
|---|---|
| Current Act data. Access only after route initialization and with valid indices; the getter does not return |
| Current Plot Boundary. It can be temporarily |
| Current Act index. Treat it as diagnostic/read-only state. |
| Current Plot index. The property has a public setter for runtime infrastructure; content code must treat it as read-only and navigate through the methods above. |
| Indicate route initialization completion and physical-boundary creation. Content that depends on runtime boundaries should wait for these states and must not take ownership of |
| C# callbacks whose arguments are Act or Plot IDs. |
| Raised after the transition effect and optional multiplayer wait complete, immediately before Unity starts loading the scene. |
| Raised when another advance is requested but no later Act or Plot exists. This marks the end of the content sequence. |
| Raised with target |
| Raised with the confirmed current Act and Plot names. Suitable for UI, logs, and position synchronization. |
Example
using UnityEngine;
using Yomov;
public class StoryNavigationExample : MonoBehaviour
{
public async void ContinueStory()
{
// For multiplayer scene changes, wait for server coordination.
await YomovActManager.Instance.LoadNextPlot(waitOtherPlayers: true);
}
public async void JumpToPlot()
{
await YomovActManager.Instance.LoadPlot("Act02", "Plot03");
}
}
4. YomovEventBus
Purpose. YomovEventBus is the SDK's strongly typed event bus. Content commonly uses it for close-eye/open-eye transitions and project-defined events. Asynchronous events are useful when a flow must wait for multiple handlers. Request/response is intended for an in-project query with a single handler.
Methods
Method | Description |
|---|---|
| Synchronously publishes an event that implements |
| Subscribes to or unsubscribes from a synchronous event. Pass the same delegate instance when unsubscribing. |
| Invokes all handlers for an |
| Subscribes to or unsubscribes from an asynchronous event. Handlers must not access destroyed Unity objects. |
| Registers the single handler for a request type. A later registration replaces the previous handler. Request and response types implement |
| Dispatches an in-project request and returns the handler response. In SDK 1.3.6, the request |
| Removes the registered handler for the request type. |
Common Content Event Types
Type | Description |
|---|---|
| Closes the visual mask or fades it to the target color. |
| Opens the visual mask. |
| Notifies recording/replay infrastructure that the current content has ended. Standard Release packages normally do not need to publish it directly. |
Project-defined event | Implement |
Example: Close and Open the Visual Mask
using UnityEngine;
using Yomov;
public class FadeTransitionExample : MonoBehaviour
{
public void CloseEyes()
{
YomovEventBus.Publish(new FadeOutEvent
{
time = 0.5f,
color = Color.black
});
}
public void OpenEyes()
{
YomovEventBus.Publish(new FaddInEvent { time = 0.5f });
}
}
5. YomovClientManager
Purpose. YomovClientManager forwards playback-control notifications such as start, pause, resume, seek, and player-height changes to content. Content consumes these notifications and does not participate in SDK authorization.
Member | Description |
|---|---|
| Subscribes to playback start. If the start signal already arrived and replay is enabled, the handler is called synchronously during subscription. The handler must be idempotent. |
| Removes the playback-start subscription. Pass the original handler. |
| Pause or resume the content's own Timeline, video, or state machine. |
| Raised after the target scene for a valid seek finishes loading. Subscribe to |
| Raised when a player-height command is received. The SDK also consumes this notification for Avatar height adaptation. |
| Read-only start state and |
6. YomovActDescriptor
Purpose. YomovActDescriptor is the scene authoring component shown as Act Unit. It describes the Act name, entrance/exit geometry, and transition settings. Configure it in the Inspector; content scripts normally read its state or bind events.
Member | Description |
|---|---|
| Narrative name and stable ID. Navigation APIs use |
| Act entrance position, Entrance Area polygon, and exit point. The Act authoring tools interpret these values in the configured scene space. |
| Transition type and close-eye duration in seconds when entering or leaving the Act. |
| Raised when this Act becomes active. Suitable for starting Act-root content. |
7. YomovPlotBoundary
Purpose. YomovPlotBoundary is the Plot Boundary authoring component. It connects narrative nodes with the physical experience area by defining Plot geometry, Plot type, trigger behavior, and boundary callbacks.
Member | Description |
|---|---|
| Plot name and stable ID. |
| Walking/vehicle mode and Plot trigger mode. |
| Vehicle GameObject used by the legacy single-vehicle Plot flow. |
| Enable multi-vehicle mode, assign its controller, and decide whether the local multi-vehicle session starts automatically after Plot activation. |
| Raised when this Plot becomes active. The argument is |
| Raised when the player enters or leaves the Plot boundary. The argument is the boundary-related position. |
| Raised after the local player's multi-vehicle follow session is fully established. The argument is the vehicle index. Start the local vehicle animation here so it does not run before runtime boundary handoff. |
8. LoadNextPlotTrigger
Purpose. LoadNextPlotTrigger dispatches an advance to the next Plot after the component's trigger is entered or its timeout is reached. Use it for endpoint gates, transition trigger zones, and single-player fallback progression.
Member / Setting | Description |
|---|---|
| Replaces the Collider used by this component. The trigger disables that component Collider before dispatching the Plot advance. It does not register a separate allow-list Collider. |
| Invoked immediately after |
Inspector settings | The Inspector exposes the component Collider, Delay Time, and Trigger Timeout. The entering GameObject must use the hard-coded |
9. YomovMultiVehicleController and RelatedVehicleInfo
Purpose. YomovMultiVehicleController manages binding, follow, and unbinding for multiple vehicles in one Plot. RelatedVehicleInfo describes each vehicle, capacity, and local experience area. Configure vehicles and content callbacks in the Inspector. YomovPlotBoundary and the SDK own activation, start, stop, and deactivation; content scripts must not duplicate those lifecycle calls.
Configuration or Event | Description |
|---|---|
| List of |
| Vehicle GameObject, maximum player capacity, and the vehicle experience area in controller-local space. |
| Enable multi-vehicle mode on the Plot, assign the controller, and decide whether the follow state starts automatically after Plot activation. |
|
|
| Raised after the local player's vehicle session is fully established. Prefer this callback when starting vehicle animation or content flow. |
10. YomovConfig and CommandLineArgs
YomovConfig
Purpose. YomovConfig exposes the current package type and runtime-mode configuration. Content reads this data and must not modify it at runtime.
Member | Description |
|---|---|
| Loads the current configuration from Resources. Access it after SDK initialization and guard against missing data. |
| Package type: |
|
|
| Read-only calculated states indicating recording mode and a Vgen replay package. |
CommandLineArgs
Purpose. CommandLineArgs contains identity and business parameters supplied by the launcher for the current run. Content may read stable business fields, but must never log or expose credentials.
Member | Description |
|---|---|
| Venue, room, and content IDs for analytics, save-data isolation, or business display. |
| Current team identity and player count. |
| Current player business ID and nickname. Apply the content project's privacy rules before displaying the nickname. |
| Language selected by the launcher. Use it as the initial localization choice. |
| Parsed extended parameters such as |
| Credential field and not a content API. Never write it to logs, documentation, analytics, or UI. |
11. ContentEventManager
Purpose. ContentEventManager is an optional Inspector bridge for no-code callbacks from Timeline, PlayableDirector, Animator, or scene objects. Do not create a duplicate Inspector binding when code already handles the same business action.
Field | Description |
|---|---|
| Parameterless |
|
|
| Parameterless callbacks raised before scene loading and at the end of the content sequence. |
|
|
12. Video Playback and Replay Synchronization
Purpose. This feature plays external video in a Linux runtime and uses YomovReplayVideoRecordSync to align video frames with scene replay recording time. Content projects normally configure components and the video path in the Inspector without calling the playback interface directly.
Recommended Component Setup:
On the GameObject that displays the video, configure a Renderer and add these four components:
-
YomovVideoPlaybackAutoBackend: selects the playback backend, preferring Linux Native GPU playback and falling back automatically. -
YomovNativeGpuVideoPlayer: Linux NVIDIA low-copy Native playback. -
YomovFFmpegPipeVideoPlayer: FFmpeg Pipe fallback when Native playback is unavailable. -
YomovReplayVideoRecordSync: connects the player to the scene replay recording timeline.
After you add YomovVideoPlaybackAutoBackend, it finds or adds the Native and Pipe components on the same GameObject. For replay recording, set YomovReplayVideoRecordSync.Player Component to YomovVideoPlaybackAutoBackend.
YomovVideoPlaybackAutoBackend
Inspector purpose. Manages both concrete player components and selects an available backend. On Linux, it prefers Native GPU when the Native plugin, graphics API, FFmpeg, ffprobe, and NVDEC requirements are met. It falls back to FFmpeg Pipe when Native is unavailable, opening fails, or the first frame is not ready.
Inspector Field | Configuration |
|---|---|
| Assign |
| Assign |
| Recommended: enabled. Tries low-copy Native GPU playback first. When disabled, uses Pipe directly. |
| Logs backend selection, fallback reasons, and errors. Enable during development. |
YomovNativeGpuVideoPlayer
Inspector purpose. NVIDIA low-copy Native playback for Linux Player or Linux Editor. Windows Editor cannot load the Linux Native plugin, so YomovVideoPlaybackAutoBackend uses the Pipe fallback.
Inspector Field | Configuration |
|---|---|
| Allows playback validation in Linux Editor. Does not affect a Linux Player build. |
| Requires a graphics API supported by the Native low-copy path. Keep enabled. |
| Loops the video at end of playback. Configure according to content needs; replay recording usually follows the recording interval. |
| Standalone player path. Leave empty when using replay synchronization; |
| Renderer that receives the video textures. Normally use the Renderer on the same GameObject. |
| Material property for the luma texture. Default: |
| Material property for the chroma texture. Default: |
| Material property that enables the YUV branch. Default: |
| Material property for the YUV full-range flag. Default: |
| Material property for the YUV color matrix. Default: |
| Material property for vertical YUV flipping. Default: |
| Vertically flips the Native output texture. Enabled by default to match Unity material coordinates. |
| First-frame timeout. Default: 5000 ms. Increase for large files or slower storage. |
| Allows embedded video audio. During replay recording, |
| Embedded video audio volume. Default: 1. |
| Audio prebuffer duration. Default: 0.25 seconds. Increase if audio startup is unstable. |
| Logs runtime, FFmpeg, NVDEC, Native plugin, and graphics API checks. Enable when diagnosing Linux playback. |
| Logs the audio playback flow. Enable only when diagnosing audio. |
YomovFFmpegPipeVideoPlayer
Inspector purpose. Decodes with FFmpeg and uploads CPU-buffered frames into a Unity Texture2D. It uses more resources than Native GPU playback but offers broader compatibility. Let YomovVideoPlaybackAutoBackend manage it as the fallback.
Inspector Field | Configuration |
|---|---|
| Allows Pipe playback validation in Linux Editor. |
| Requires the graphics API to pass environment validation. Keep enabled. |
| Requests NVDEC hardware decoding when supported. Automatic fallback from Native selects the stable CPU path when required. |
| Loops the video at end of playback. |
| Playback multiplier. Default: 1. Keep at 1 for replay recording synchronization. |
| Advanced FFmpeg input arguments. Leave empty unless you understand the FFmpeg options being added. |
| Standalone player path. Leave empty when the Sync component supplies the path. |
| Renderer that receives the video texture, normally on the same GameObject as AutoBackend and Sync. |
| Material property that receives the RGB texture. Default: |
| Material YUV-branch switch. Default: |
| Vertically flips FFmpeg output frames. Enabled by default to match Unity texture orientation. |
| First-frame timeout. Default: 5000 ms. |
| Allows embedded video audio. During replay recording, |
| Embedded video audio volume. Default: 1. |
| Audio prebuffer duration. Default: 0.25 seconds. |
| Logs playback environment checks. Enable when diagnosing FFmpeg or graphics issues. |
| Logs FFmpeg process output. It is verbose; enable only when diagnosing decode failures. |
| Logs the audio playback flow. Enable only when diagnosing audio. |
YomovReplayVideoRecordSync
Inspector purpose. Before replay recording starts, seeks the video to the current replay time and waits for the first frame. It resumes playback when recording starts and stops/releases resources according to its configuration after recording. Video is not played while browsing replay at 10x speed.
Inspector Field | Configuration |
|---|---|
| Assign |
| Renderer that displays video during recording and can be hidden outside recording. |
| External path relative to |
| Offset relative to scene replay time. Target video time = scene replay time + offset, clamped to 0 or later. |
| Plays embedded video audio during recording. Disable when the scene already contains separate spatial audio. |
| Stops video after recording. Keep enabled. |
| Hides the Renderer outside recording to prevent stale frames during replay browsing or preparation. Keep enabled. |
| Releases Native playback resources when the component is disabled. Keep enabled to avoid retaining GPU decode and external texture resources. |
| Logs backend selection, seek, first-frame preparation, recording start, and resource release. Enable during development. |
Replay Recording Setup
-
Place the external video under
AssetBundle/in the project root or Linux executable root. -
Configure a Renderer and a material that supports the required texture properties on the video display object.
-
Add
YomovVideoPlaybackAutoBackendand verify that Native Backend and Pipe Fallback are assigned. -
Add
YomovReplayVideoRecordSync; point Player Component to AutoBackend and Target Renderer to the display Renderer. -
Set Video Path relative to
AssetBundle/, then configure Video Time Offset Seconds against scene replay time. -
The recording system handles first-frame seeking, playback start, and post-recording cleanup. Content scripts do not need to control playback separately.
13. Special-Mode APIs
YomovVgenCamera
Purpose. Records a camera shot in a Vgen replay package. Calls from standard Test or Release packages do not start recording.
Method | Description |
|---|---|
| Starts recording with the component's camera, duration, and ShotScope settings. |
| Invokes the callback after recording actually starts. |
| Uses the specified scene replay time as the recording trigger point. |
| Full overload with both a start callback and an optional replay trigger time. |
14. Do Not Use as Content APIs
Member or Legacy Pattern | Required Handling |
|---|---|
| Legacy direct subscription. Use |
| Legacy API. Migrate to |
| SDK authorization, diagnostics, and exit policy. Content does not call or subscribe to these members. |
| No stable runtime consumer exists in the current SDK. It is not a player teleport API. Move the player through the project's controller and use close-eye/open-eye events when needed. |
| The current implementation only waits; it does not render a visual transition. It cannot replace |
| Its current scene-loading path is disabled; do not use it as a content entry point. |
| Internal index or network bridging. They do not form a complete navigation contract. Use |
| SDK runtime boundary state. Content may wait for readiness but must not reparent the object, persist it independently, or own collection lifecycle. |
| SDK infrastructure. Use the higher-level vehicle, video, and recording entry points instead of sending protocol messages or controlling server lifecycle. |
| Playback backend implementations and diagnostics. Standard content should use |
15. Reference and Verification Scope
This reference is derived from the current Unity SDK 1.3.6 source and covers the content-development surface for narrative navigation, spatial boundaries, vehicles, runtime configuration, video playback, and recording. A C# member being public does not by itself make it a supported third-party API; only members documented on this page are part of the content contract. Preserve the exact spelling and capitalization of API, Inspector, Timeline, resource-path, and reflection identifiers.