Skip to content

Conversation

@mockersf
Copy link
Member

Objective

Solution

  • Make a new EasyScreenshotPlugin in the dev tools

Testing

  • Add to any example
        .add_plugins(bevy::dev_tools::EasyScreenshotPlugin {
            trigger: KeyCode::KeyP,
            ..default()
        })
  • Run the example with the feature bevy_dev_tools enabled
  • press the P key
  • screenshot! 🎉

Copy link
Contributor

@ChristopherBiscardi ChristopherBiscardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

never thought I'd see an IIFE in Rust.

Copied the plugin into a random project and configured it. Works as expected.

Image

@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it C-Feature A new feature, making something new possible A-Meta About the project itself A-Dev-Tools Tools used to debug Bevy applications. labels Sep 27, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Sep 29, 2025
Merged via the queue into bevyengine:main with commit c738bce Sep 29, 2025
45 checks passed
ickshonpe pushed a commit to ickshonpe/bevy that referenced this pull request Dec 15, 2025
# Objective

- Followup on bevyengine#21235
- See
mockersf/bevy@easy-screenshots...mockersf:bevy:easy-screenrecording
for what's new
- Be able to record videos from Bevy in a consistent manner

## Solution

- Make a new `EasyScreenRecordPlugin` in the dev tools

## Testing

- Add to any example
```
        .add_plugins(bevy::dev_tools::EasyScreenRecordPlugin::default())
```
- Run the example with the feature `bevy_internal/screenrecording`
enabled
- press the space bar
- wait for it...
- press the space bar again
- screen recording! 🎉 
- almost... you now have a h264 file. VLC can read them, but they are
not the most friendly format
- `ffmpeg` is our friend! `for file in *.h264; do ffmpeg -i $file
$file.mp4; done`
- you now have a .mp4 file that can be shared anywhere!

---

## Showcase

directly taken by Bevy


https://github.com/user-attachments/assets/217f5093-9443-40e5-b2ce-33f65f6a56c6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Dev-Tools Tools used to debug Bevy applications. A-Meta About the project itself C-Feature A new feature, making something new possible S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants