https://github.com/rydb/bevy_serialization_extras
contains plugins/systems to make serialization/deserialization with bevy smoother
https://github.com/rydb/bevy_serialization_extras
Last synced: 3 months ago
JSON representation
contains plugins/systems to make serialization/deserialization with bevy smoother
- Host: GitHub
- URL: https://github.com/rydb/bevy_serialization_extras
- Owner: rydb
- License: mit
- Created: 2023-09-22T20:10:54.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-18T22:59:05.000Z (3 months ago)
- Last Synced: 2025-03-18T23:31:34.022Z (3 months ago)
- Language: Rust
- Size: 7.65 MB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-bevy - `bevy_serialization_extras`
README
bevy_serialization_extras
A library for component oriented serialization.
## Features
- Out of the box serialization Through [`plugins`] for components
```Rust
// Component <-> WrapperComponent
.add_plugins(SerializeComponentFor::::default())// Asset <-> WrapperComponent
.add_plugins(SerializeAssetFor::, MaterialFlag3d>::default())
// Query -> Component,
.add_plugins(SerializeQueryFor::::default())
```- Serialization of groups of enities that compose an asset into their singular asset equivillent, and vice-versa
### A visualization util to list serializable/unserializable components(W.I.P) [bevy_serialization_core]
[demo_gif.webm](https://github.com/rydb/bevy_serialization_extras/assets/43288084/3bda45f1-c75a-437b-a02d-27e58bd3276e)
### Visualize and edit 3rd party components that do not [`Reflect`]
#### E.G: Edit Rapier's `ImpulseJoint` through `JointFlag` [bevy_serialization_physics]
### Serialize a collection of entities into an [`Asset`] that is composed of them
#### E.G: serialize the parts of a robot into a [`Urdf`] [bevy_serialization_assemble]```Rust
//(entity_0, ... entity_n) -> Asset
// [UNIMPLEMENTED] Asset -> (entity_0, ... entity_n)
.add_plugins(SerializeManyAsOneFor::::default())
```https://github.com/user-attachments/assets/fb1a1b09-db3f-4476-9b0d-800b296ccb8a
## Why bevy_serialization_extras?
- bevy_serialization_extras is built ontop of `bevy_reflect`, not serde. No need to double dip to serialize.
- bevy_serialization_extras allows regular serialization into .ron via [`moonshine_save`] + allows converting serializables into more stable file formats via bevy_serialization_assemble.
serde serialization:
> world <--> scene.jsonbevy_serialziation_extras:
```
(object) <--> (partA, partB) <--> .file
(person) (body + arm_0...arm_n + leg_0..leg_n) <--> .file
world <--> scene.ron
```This is good for creating editors in bevy.
## Credits
[`moonshine_save`] for the save/load backend of this library
## Usage
See sub-crate `/examples` files for example usage.