While the examples can each be examined on their own, there is a general ordering to them for those trying to learn the basics of this crate.
The recommended order is:
- loading.rs - Loading and spawning prototypes
- hot_reload.rs- How to enable and use hot reloading with prototypes
- basic_schematic.rs - The basics of using schematics
- templates.rs - How to inherit functionality from other prototypes
- derive_schematic.rs - A deeper look at the derive macro
- custom_schematic.rs - Creating a custom
Schematic
implementation - hierarchy.rs - Defining complex prototype hierarchies with children
- asset_schematic.rs - Creating an
AssetSchematic
for inlinable assets - cycles.rs - How prototype cycles are handled
- custom_loader.rs - How to create a custom loader
- custom_config.rs - How to create a custom config
The bevy
folder contains examples based on
the official Bevy examples.
These examples are meant to show how we can modify the Bevy examples to make use of prototypes.
Most examples use their own set of defined prototypes. These all exist within the assets/examples directory.
cargo run --package bevy_proto --example <EXAMPLE NAME>
Most examples should run using the default features. However, some may require a non-default feature be enabled.
You can add --features <FEATURE NAME>
to enable them.
Or run with --all-features
to enable all features.