bevy_egui 0.1.0

A plugin for Egui integration into Bevy
docs.rs failed to build bevy_egui-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: bevy_egui-0.26.0

bevy_egui

Crates.io license Crates.io Rust

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

Features:

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.

bevy_egui

Trying out

An example WASM project is live at mvlabat.github.io/bevy_egui_web_showcase [source].

Note that in order to use bevy_eguiin WASM you need bevy_webgl2 of at least 0.4.1 version.

Usage

Here's a minimal usage example:

# Cargo.toml
[dependencies]
bevy = "0.4"
bevy_egui = "0.1"
use bevy::prelude::*;
use bevy_egui::{egui, EguiContext, EguiPlugin};

fn main() {
    App::build()
        .add_plugins(DefaultPlugins)
        .add_plugin(EguiPlugin)
        .add_system(ui_example.system())
        .run();
}

fn ui_example(mut egui_context: ResMut<EguiContext>) {
    let ctx = &mut egui_context.ctx;
    egui::Window::new("Hello").show(ctx, |ui| {
        ui.label("world");
    });
}

For a more advanced example, see examples/ui.rs.

cargo run --example ui --features="bevy/x11 bevy/png bevy/bevy_wgpu"