Crate bevy_egui[][src]

Expand description

This crate provides a Egui integration for the Bevy game engine.

Trying out:

An example WASM project is live at [source].


bevy_egui can be compiled with using only bevy and egui as dependencies: manage_clipboard and open_url features, that require additional crates, can be disabled.


Here’s a minimal usage example:

use bevy::prelude::*;
use bevy_egui::{egui, EguiContext, EguiPlugin};

fn main() {

// Note the usage of `ResMut`. Even though `ctx` method doesn't require
// mutability, accessing the context from different threads will result
// into panic if you don't enable `egui/multi_threaded` feature.
fn ui_example(egui_context: Res<EguiContext>) {
    egui::Window::new("Hello").show(egui_context.ctx(), |ui| {

For a more advanced example, see examples/

cargo run --example ui

See also


pub use egui;


The names of bevy_egui nodes.


A resource for storing bevy_egui context.

Is used for storing the input passed to Egui. The actual resource is a [HashMap<WindowId, EguiInput>].

Is used for storing Egui output. The actual resource is [HashMap<WindowId, EguiOutput>].

Adds all Egui resources and render graph nodes.

A resource for storing global UI settings.

Is used for storing Egui shapes. The actual resource is [HashMap<WindowId, EguiShapes>].

Egui’s render graph config.


The names of bevy_egui stages.

The names of egui systems.


A handle pointing to the egui [PipelineDescriptor].

Name of the texture uniform.

Name of the transform uniform.


Set up egui render pipeline.