Expand description
Edit-time effect graph asset and its bake to a runtime EffectAsset.
EffectGraphAsset is a stable-identity, serializable graph the editor
mutates directly and saves to disk. An EffectAsset is a derived bake
output of it (see bake), used for preview and runtime.
This crate is egui- and editor-agnostic so it can be used in two ways:
- Offline baking: a build tool consumes
EffectGraphAssetand produces anEffectAsset, e.g. through anAssetProcessor. See thebakeexample. - Runtime loading: a game loads unbaked
EffectGraphAssetfiles during development viaEffectGraphLoaderand bakes them in-process.
Modules§
- bake
- Baking an
EffectGraphinto a runtimebevy_hanabi::EffectAsset. - demo
- A native
EffectGraphequivalent of the programmatic demo effect. - import
- Best-effort import of a baked
EffectAssetinto anEffectGraph. - model
- Data types of the
EffectGraphmodel. - modifier_
names - User-facing display names for
bevy_hanabimodifiers. - modifier_
ops - Modifier list mutation primitives.
- modifier_
registry - Discovers modifier types and their factories via
AppTypeRegistry. - processor
- Bakes
.hnbEffectGraphAssetfiles into runtimeEffectAssets. - schema
- Reflection-derived field schema for modifier nodes.
- validation
- Effect-graph validation checks.
Structs§
- Effect
Graph Loader - Loads
.hnbRON files into anEffectGraphAsset. - Effect
Graph Plugin - Registers
EffectGraphAssetand itsEffectGraphLoader.
Enums§
- Effect
Graph Loader Error - Errors produced while loading an
EffectGraphAsset. - Modifier
Group - Which of the three modifier lists a modifier lives in.
Constants§
- MAGIC_
HEADER - Leading marker line stamped on every
.hnbfile for content detection.
Functions§
- from_
ron_ bytes - Parse an
EffectGraphAssetfrom RON bytes. - to_
ron_ string - Serialize an
EffectGraphAssetto pretty RON for writing a.hnbfile.