Chapters

Chapters are named timeline markers stored in the recording. They are used during playback to seek quickly to important moments.

Chapter Recording Modes

The XR Recorder module supports two chapter recording modes:

  1. Manual: a chapter is written only when code calls PushChapter(string name).

  2. PerAction: a chapter is written automatically each time a SceneGraph action is initialized.

How Per-Action Chapters Work

At startup, RecorderModule subscribes to SceneGraph action initialization. When a new action is initialized, the recorder checks:

  1. ChapterMode == PerAction

  2. A recording is currently running

If both conditions are true, the module pushes a chapter immediately.

Chapter naming behavior:

  1. Use action ActionName when it is set.

  2. Otherwise use action ID.

This gives stable markers even if some actions are unnamed.

How To Configure Per-Action Chapters

In Unity:

  1. Open the XR Recorder module asset.

  2. Go to Advanced Settings.

  3. Set Chapter Mode to PerAction.

  4. Start a recording normally.

From now on, each action initialization creates one chapter marker.

Runtime Notes

  1. Chapters are ignored when not recording.

  2. In Manual mode, nothing is auto-created; call PushChapter yourself.

  3. Chapters are exposed via ListChapters() and used by playback UI for chapter seek buttons and timeline markers.

Basic Manual Chapter Example

1
2
3
4
5
6
7
8
// using MAGES;
// using MAGES.Recorder;
// ...

var recorderModule = Hub.Instance.Get<RecorderModule>();

// Works only while recording is running.
recorderModule.PushChapter("Checkpoint A");