aevyrie / bevy_mod_picking

Picking and pointer events for Bevy.
https://crates.io/crates/bevy_mod_picking
Apache License 2.0
765 stars 169 forks source link

Can't get Drag & Drop example to work outside of the repo #257

Closed RobWalt closed 11 months ago

RobWalt commented 11 months ago

I literally just copy-pasted the code from the example (drag_and_drop.rs) into an empty project and added the following Cargo.toml

[package]
name = "bevy_mod_picking_sanity_check"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bevy = { version = "0.11", features = ["wayland"] }
bevy_egui = "0.21"
bevy_eventlistener = "0.3"
bevy_mod_picking = "0.15"

I'm on wayland, so maybe that's it. It's weird though since the example runs in your repo when I run with cargo run --release --example drag_and_drop

Here's what it looks like on my machine. It's just unresponsive

recording

RobWalt commented 11 months ago

Ok, I actually managed to get it to run now if I use the latest version from the repo via

bevy_mod_picking = { git = "https://github.com/aevyrie/bevy_mod_picking" }

Seems like important changes have been added in the meantime. Would it be feasible for you to release a patch version?

aevyrie commented 11 months ago

If you copied the code from main, but are using the crates.io release, that won't work because the versions are incompatible. You need to be using the examples that match the version of the plugin you are using. That's why switching to main worked - you were using example code from main.

ex v0.15.0: https://github.com/aevyrie/bevy_mod_picking/tree/v0.15.0