docs.rs failed to build bevy_mod_config-0.3.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
bevy_mod_config-0.7.1
bevy_mod_config
A bevy plugin for configuration management.
Concepts
- Scalar: A non-composite config type, e.g. a number, string, color, direction, etc.
- Root field: A top-level config field directly registered to the app.
- Manager: A plugin that works on scalar config fields.
- Reader: A type derived from
#[derive(Config)]that can be used to access config values throughReadConfigin systems.
Usage
Declare one or more config hierarchies with #[derive(Config)]:
// Expose the generated `ColorRead`
Initialize the root field with App::init_config:
type ManagerType = ;
ScalarManager,
)
app.;
Root fields can be accessed from systems using ReadConfig:
Note that read() returns the Reader type instead of the original type
(similar to how #[derive(QueryData)] gives XxxItem to systems).
This may have an impact on matching and passing values around.
The Reader type may be accessed as <Foo as ConfigField>::Read<'_>,
or directly exposed with #[config(expose(read))] after the derive.
Managers
Managers enable systematic management of scalar config fields.
- Storage:
bevy_mod_config::manager::Serdeexposes APIs to load/save config values to/from serialized data.
- Editors:
bevy_mod_config::manager::EguiEditorprovides an in-gameeguieditor to modify config values live.