Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rparrett/bevy_simple_prefs
A small Bevy plugin for persisting multiple Resources to a single file
https://github.com/rparrett/bevy_simple_prefs
bevy game-development rust
Last synced: 2 months ago
JSON representation
A small Bevy plugin for persisting multiple Resources to a single file
- Host: GitHub
- URL: https://github.com/rparrett/bevy_simple_prefs
- Owner: rparrett
- License: other
- Created: 2024-06-10T14:00:55.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-07-26T04:41:30.000Z (5 months ago)
- Last Synced: 2024-09-27T07:03:35.904Z (3 months ago)
- Topics: bevy, game-development, rust
- Language: Rust
- Homepage:
- Size: 146 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bevy_simple_prefs
[![crates.io](https://img.shields.io/crates/v/bevy_simple_prefs.svg)](https://crates.io/crates/bevy_simple_prefs)
[![docs](https://docs.rs/bevy_simple_prefs/badge.svg)](https://docs.rs/bevy_simple_prefs)
[![Following released Bevy versions](https://img.shields.io/badge/Bevy%20tracking-released%20version-lightblue)](https://bevyengine.org/learn/book/plugin-development/#main-branch-tracking)An unambitious Bevy plugin for persisting multiple Bevy `Resource`s into a single preferences file, suitable for small projects like jam games.
- Persists to a single `ron` file
- Does IO in Bevy's async task pool
- WASM compatible## Usage
- Derive `Prefs` on a `struct` with members that are `Resource`s you want to be saved
- Simply modify your `Resource`s to initiate a save
- Write code that reacts to those `Resource`s changing, if you wantSee [examples/prefs.rs](./bevy_simple_prefs/examples/prefs.rs)
## Compatibility
| `bevy_simple_prefs` | `bevy` |
| :-- | :-- |
| `0.1`-`0.3` | `0.14` |## Contributing
Please feel free to open a PR, but keep in mind this project's goals. This is meant to be a very lightweight crate. There should be zero additional dependencies on other Bevy ecosystem crates.
Please keep PRs small and scoped to a single feature or fix.
## Alternatives
If you need more features, check out [`bevy-persistent`](https://crates.io/crates/bevy-persistent) or [`bevy-settings`](https://crates.io/crates/bevy-settings). There are also a few other options in the [persistence section](https://bevyengine.org/assets/#persistence) of Bevy Assets.