Skip to content

feat(state-replay): experimental state-based session replay - #1479

Draft
mujacica wants to merge 1 commit into
mainfrom
feat/state-based-session-replay
Draft

feat(state-replay): experimental state-based session replay#1479
mujacica wants to merge 1 commit into
mainfrom
feat/state-based-session-replay

Conversation

@mujacica

Copy link
Copy Markdown
Contributor

Adds USentryStateReplaySubsystem, a self-contained GameInstance subsystem that streams a structured, AI-parseable snapshot of gameplay state to a local JSONL file each frame — an alternative to the video-based session replay that is CPU -cheap, tiny, and queryable, and works where a GPU video encoder can't ship.

Per frame it auto-captures:

  • local pawn transform + camera POV (loc/rot/fov)
  • transforms of actors registered via AddTrackedActor (id/tag)
  • the active UMG widget tree: normalized rects, text, hover/disabled, progress %
  • perf (fps / frame-time) and a game-state channel (auto entity counts + a SetState/SetStateString API)

UI interaction is captured at the Slate level via an input pre-processor, so clicks on Blueprint menu buttons are recorded and resolved to widget names even while gameplay is paused. Gameplay code can push semantic events via AddEvent.

Ships a zero-dependency local player (tools/state-replay-player) that reconstructs the session in 3D with low-poly stand-in assets and a player-POV camera (2D top-down fallback), plus a UMG UI overlay, FPS/entity telemetry, a click-to-seek event timeline, and a one-click AI session digest.

Scope: local developer/AI-debugging tool. Does not touch the crash pipeline or upload anything (crash-attachment is a deliberate follow-up). Standalone subsystem — not part of the platform interface, so no Null stubs required.

Config: Project Settings -> Plugins -> "Sentry State Replay" (disabled by default).
Sentry.Build.cs: +UMG, +DeveloperSettings, +InputCore.

…pture + viewer)

Adds `USentryStateReplaySubsystem`, a self-contained GameInstance subsystem that
streams a structured, AI-parseable snapshot of gameplay state to a local JSONL
file each frame — an alternative to the video-based session replay that is CPU
-cheap, tiny, and queryable, and works where a GPU video encoder can't ship.

Per frame it auto-captures:
- local pawn transform + camera POV (loc/rot/fov)
- transforms of actors registered via AddTrackedActor (id/tag)
- the active UMG widget tree: normalized rects, text, hover/disabled, progress %
- perf (fps / frame-time) and a game-state channel (auto entity counts + a
  SetState/SetStateString API)

UI interaction is captured at the Slate level via an input pre-processor, so
clicks on Blueprint menu buttons are recorded and resolved to widget names even
while gameplay is paused. Gameplay code can push semantic events via AddEvent.

Ships a zero-dependency local player (tools/state-replay-player) that reconstructs
the session in 3D with low-poly stand-in assets and a player-POV camera (2D
top-down fallback), plus a UMG UI overlay, FPS/entity telemetry, a click-to-seek
event timeline, and a one-click AI session digest.

Scope: local developer/AI-debugging tool. Does not touch the crash pipeline or
upload anything (crash-attachment is a deliberate follow-up). Standalone subsystem
— not part of the platform interface, so no Null stubs required.

Config: Project Settings -> Plugins -> "Sentry State Replay" (disabled by default).
Sentry.Build.cs: +UMG, +DeveloperSettings, +InputCore.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor
Fails
🚫 Please consider adding a changelog entry for the next release.
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Features

- experimental state-based session replay ([#1479](https://github.com/getsentry/sentry-unreal/pull/1479))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against 86a368a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant