Skip to content

Bli-AIk/bevy_workbench

Repository files navigation

bevy_workbench

license

Current Status: 🚧 Early Development (Initial version in progress)

bevy_workbench — A mid-level editor scaffold for Bevy, between bevy-inspector-egui and Unity/Godot editors.

English Simplified Chinese
English 简体中文

Introduction

bevy_workbench is an egui-based editor scaffold designed for Bevy game projects.
It provides a structured editor layout with panels, theming, and extensibility — without imposing heavy scene management or asset pipeline opinions.

With bevy_workbench, you can quickly set up a development editor for your Bevy game with inspector, console, game view, and menu bar panels.

Features

  • egui_tiles dock layout — Drag, rearrange, split, and close/reopen panels freely
  • Rerun-inspired dark theme — Dark UI theme ported from Rerun's color system, plus Catppuccin and egui presets
  • Menu bar — File/Edit/View menus with Play/Pause/Stop toolbar
  • Inspector — Entity hierarchy and component editor powered by bevy-inspector-egui, with undo support via reflection snapshots
  • Console — Tracing log bridge with severity filtering
  • Game View — Render-to-texture viewport with focus isolation and correct coordinate mapping
  • Editor modes — Edit / Play / Pause mode switching with GameClock and GameSchedule
  • Undo/Redo — Layout changes, inspector edits, with undo history panel
  • Custom panel registration — Implement WorkbenchPanel trait and call app.register_panel()
  • Configurable keybindings — Click to re-record, add alternative bindings
  • i18n — English / 中文 built-in, extensible with custom Fluent FTL sources
  • Theme system — Per-mode themes with brightness control, multiple presets
  • Layout persistence — Save/load dock layouts as JSON
  • Custom font support — System locale detection with configurable font path
  • Settings panel — UI scale, theme, locale, and font configuration

How to Use

  1. Add to your Cargo.toml:

    [dependencies]
    bevy_workbench = "0.3"
  2. Basic setup:

    use bevy::prelude::*;
    use bevy_workbench::prelude::*;
    use bevy_workbench::console::console_log_layer;
    
    fn main() {
        App::new()
            .add_plugins(
                DefaultPlugins.set(bevy::log::LogPlugin {
                    custom_layer: console_log_layer,
                    ..default()
                }),
            )
            .insert_resource(ClearColor(Color::BLACK))
            .add_plugins(WorkbenchPlugin::default())
            .add_plugins(GameViewPlugin)
            .add_systems(Startup, |mut commands: Commands| {
                commands.spawn(Camera2d);
            })
            .run();
    }
  3. Run the example:

    cargo run -p bevy_workbench --example minimal

How to Build

Prerequisites

  • Rust 1.85 or later
  • Bevy 0.18 compatible system dependencies:
    # Linux (Ubuntu/Debian)
    sudo apt-get install -y g++ pkg-config libx11-dev libasound2-dev libudev-dev \
        libwayland-dev libxkbcommon-dev

Build Steps

  1. Clone the repository:

    git clone https://github.com/Bli-AIk/bevy_workbench.git
    cd bevy_workbench
  2. Build the project:

    cargo build
  3. Run tests:

    cargo test
  4. Run examples:

    cargo run --example minimal

Dependencies

This project uses the following crates:

Crate Version Description
bevy 0.18 Game engine framework
bevy_egui 0.39 egui integration for Bevy
bevy-inspector-egui 0.36 ECS inspector widgets
egui 0.33 Immediate mode GUI library
egui_tiles 0.14 Tiling dock layout
catppuccin-egui 5.7 Catppuccin theme presets

Contributing

Contributions are welcome! Whether you want to fix a bug, add a feature, or improve documentation:

  • Submit an Issue or Pull Request.
  • Share ideas and discuss design or architecture.

License

This project is licensed under either of

at your option.

About

A mid-level editor scaffold for Bevy, between bevy-inspector-egui and Unity/Godot editors.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

 
 
 

Contributors