Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/examples/app/drag_and_drop.rs
6592 views
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 events: EventReader<FileDragAndDrop>) {
13
for event in events.read() {
14
info!("{:?}", event);
15
}
16
}
17
18