Expand description
This crate implements various derive macros for easing the use of various amethyst features. At the moment, this consists of event readers, prefab and UI widget derives.
Derive Macrosยง
- Event
Reader - EventReader
- Prefab
Data - Deriving a
Prefabrequires thatamethyst::ecs::Entity,amethyst:assets::{PrefabData, ProgressCounter}andamethyst::error::Errorare imported and visible in the current scope. This is due to how Rust macros work. - System
Desc - Derive a
SystemDescimplementation. - Widget
Id - This allows the use of an enum as an ID for the
Widgetsresource. One variant has to be marked as the default variant with#[widget_id_default] and will be used when aWidgetis added to the resource without an explicit ID. Note that when usingWidgets::add`, this will overwrite an existing widget with the same default id!