drag_and_drop/drag_and_drop.rs
1//! An example that shows how to handle drag and drop of files in an app.
2
3use bevy::prelude::*;
4
5fn main() {
6 App::new()
7 .add_plugins(DefaultPlugins)
8 .add_systems(Update, file_drag_and_drop_system)
9 .run();
10}
11
12fn 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}