ワンクリックで
uloop-replay-input
// Replay recorded input during PlayMode with frame-precise injection. Use when you need to: (1) Reproduce recorded gameplay exactly, (2) Run E2E tests from recorded input, (3) Generate demo videos with consistent input.
// Replay recorded input during PlayMode with frame-precise injection. Use when you need to: (1) Reproduce recorded gameplay exactly, (2) Run E2E tests from recorded input, (3) Generate demo videos with consistent input.
Execute C# code dynamically in Unity Editor. Use when you need to: (1) Wire prefab/material references and AddComponent operations, (2) Edit SerializedObject properties and reference wiring, (3) Perform scene/hierarchy edits and batch operations, (4) PlayMode automation (click buttons, raycast, invoke methods), (5) PlayMode UI controls (InputField, Slider, Toggle, Dropdown), (6) PlayMode inspection (scene info, reflection, physics state). NOT for file I/O or script authoring.
Execute Unity Editor menu commands programmatically. Use when you need to: (1) Trigger menu commands like save, build, or refresh, (2) Automate editor actions via menu paths, (3) Run custom menu items defined in project scripts.
Record keyboard and mouse input during PlayMode into a JSON file. Use when you need to: (1) Capture human gameplay input for later replay, (2) Record input sequences for E2E testing, (3) Save input for bug reproduction.
Capture screenshots of Unity Editor windows as PNG files. Use when you need to: (1) Screenshot Game View, Scene View, Console, Inspector, or other windows, (2) Capture current visual state for debugging or documentation, (3) Save editor window appearance as image files.
Simulate keyboard key input in PlayMode via Input System. Use when you need to: (1) Press game control keys like WASD, Space, or Shift during PlayMode, (2) Hold keys down for continuous movement or actions, (3) Combine multiple held keys for complex input like Shift+W for sprint.
Simulate mouse input in PlayMode via Input System. Injects button clicks, mouse delta, and scroll wheel directly into Mouse.current. Use when you need to: (1) Click in games that read Mouse.current.leftButton.wasPressedThisFrame, (2) Right-click for actions like block placement, (3) Inject mouse delta for FPS camera control, (4) Inject scroll wheel for hotbar switching or zoom. For UI elements with IPointerClickHandler, use simulate-mouse-ui instead.
| name | uloop-replay-input |
| description | Replay recorded input during PlayMode with frame-precise injection. Use when you need to: (1) Reproduce recorded gameplay exactly, (2) Run E2E tests from recorded input, (3) Generate demo videos with consistent input. |
Replay recorded keyboard and mouse input during PlayMode. Loads a JSON recording and injects input frame-by-frame via Input System with zero CLI overhead. Supports looping and progress monitoring.
# Start replay (auto-detect latest recording)
uloop replay-input --action Start
# Start replay with specific file
uloop replay-input --action Start --input-path scripts/my-play.json
# Start replay with looping
uloop replay-input --action Start --loop true
# Check replay progress
uloop replay-input --action Status
# Stop replay
uloop replay-input --action Stop
| Parameter | Type | Default | Description |
|---|---|---|---|
--action | enum | Start | Start, Stop, Status |
--input-path | string | auto | JSON path. Auto-detects latest in .uloop/outputs/InputRecordings/ |
--show-overlay | boolean | true | Show replay progress overlay |
--loop | boolean | false | Loop continuously |
Replay injects the exact same input frame-by-frame, but the game must also be deterministic to produce identical results. See the "Design Guidelines for Deterministic Replay" section in the record-input skill for the full list of patterns to avoid (Time.deltaTime, Random.Range, physics, etc.) and their deterministic alternatives.
Returns JSON with:
Success: Whether the operation succeededMessage: Status messageInputPath: Path to recording file (Start only)CurrentFrame: Current replay frameTotalFrames: Total frames in recordingProgress: Replay progress (0.0 - 1.0)IsReplaying: Whether replay is active