docs/bevy/examples/app/drag_and_drop.rs 427 B · 16 lines · raw · history

1 //! An example that shows how to handle drag and drop of files in an app.
2
3 use bevy::prelude::*;
4
5 fn main() {
6 App::new()
7 .add_plugins(DefaultPlugins)
8 .add_systems(Update, file_drag_and_drop_system)
9 .run();
10 }
11
12 fn file_drag_and_drop_system(mut drag_and_drop_reader: MessageReader<FileDragAndDrop>) {
13 for drag_and_drop in drag_and_drop_reader.read() {
14 info!("{:?}", drag_and_drop);
15 }
16 }