MrGVSV / bevy_proto

Create config files for entities in Bevy
Other
239 stars 25 forks source link

Additional Formats Support #4

Open chrisburnor opened 2 years ago

chrisburnor commented 2 years ago

A few additional file formats for the prototypes would be helpful. In particular Ron and Toml support would be a nice extension to Yaml and Json and are supported by existing libraries.

MrGVSV commented 2 years ago

You are able to use this by implementing your own ProtoDeserializer (replace the YAML deserializer with your own), such as:

https://github.com/MrGVSV/bevy_proto/blob/fb7bde3b49a1642443cd649c9239da36cf38cba6/src/plugin.rs#L88-L99

Then just add it as an option in ProtoPlugin.

MrGVSV commented 2 years ago

But maybe I'll change the default serialization to be feature-dependent. Then you can choose from a few common ones such as YAML/JSON, RON, and maybe one or two more built-in to the crate 🤔