Feature request: File dialog handling
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## What problem does this solve or what need does it fill?
Native open/save file dialogs are surprisingly hard to do in Rust, and Bevy makes them even harder. The only crate I'm aware is able to show file dialogs across all main platforms is [`rfd`](https://github.com/PolyMeilex/rfd). However, due to some bug in [`winit`](https://github.com/rust-windowing/winit), a dependency of Bevy, only asynchronous file dialogs seem to work (see the discussion in [this](https://github.com/PolyMeilex/rfd/issues/11) issue). Getting asynchronous code to work with Bevy would probably require either changing some Bevy internals, or fixing code further down the dependency chain.
In other words, file dialogs are currently very hard in Bevy, and having them already implemented would be very convenient.
## What solution would you like?
If possible, I'd like that there were something like a resource that somehow handled opening a file dialog across platforms and returning its result. It could be gated behind a feature if this doesn't work across all platforms, or requires many extra dependencies. If this turns out to be infeasible, an optional plugin for a window simulating a file dialog would still be very useful.
## What alternative(s) have you considered?
I considered using other dependencies, but this doesn't seem to work due to the reasons outlined above.
Contributor guide
Assessment
This issue has not been assessed yet.