JMS55 / bevy_dioxus

Apache License 2.0
56 stars 8 forks source link

Requires bevy_mod_picking explicitly #21

Closed alexanderjophus closed 3 months ago

alexanderjophus commented 3 months ago

Hey, not sure if this plugin is "ready", but I've started using it as I love Dioxus.

I noticed the example needed bevy_mod_picking, and I tried to do a simple hello world without adding the mod picking plugin, but it broke. As part of the error I got this;

Requested resource bevy_ecs::event::Events<bevy_picking_core::events::Pointer<bevy_picking_core::events::Click>> does not exist in the `World`.
                Did you forget to add it using `app.insert_resource` / `app.init_resource`?
                Resources are also implicitly added via `app.add_event`,
                and can be added by plugins.

I'm wondering if this plugin should explicitly initialise the mod picking plugin. If so, I'm happy to make the change and PR it.

JMS55 commented 3 months ago

I explicitly left bevy_mod_picking setup to users, as the backend setup should be controlled by them, and it's a popular plugin used for more than just UI oftentimes. Bevy mod picking is also going to be upstreamed into bevy in the medium term, so I'm not too pressed about changing this approach.

Happy to hear you like this crate. It's usable enough, but I haven't put much serious effort into it, and don't plan on doing so. It's supported "as much as I feel like it on a given week". If you have feedback, feel free to open more issues or reach out on github though.