Skip to content

Compatibility with bevy_egui. #49

Answered by Barugon
Oglo12 asked this question in Q&A
Discussion options

You must be logged in to vote

It works.

[dependencies]
bevy = "0.14"
bevy_egui = "0.28"
egui_file = "0.18"
use bevy::prelude::*;
use bevy_egui::{EguiContexts, EguiPlugin};
use egui_file::FileDialog;

fn main() {
  let mut dialog = FileDialog::open_file(None);
  dialog.open();

  let ui_example_system = move |mut contexts: EguiContexts| {
    dialog.show(contexts.ctx_mut());
  };

  App::new()
    .add_plugins(DefaultPlugins)
    .add_plugins(EguiPlugin)
    .add_systems(Update, ui_example_system)
    .run();
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Barugon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #40 on July 25, 2024 22:18.