[][src]Crate amethyst_derive

Derive Macros


Deriving a Prefab requires that amethyst::ecs::Entity, amethyst:assets::{PrefabData, ProgressCounter} and amethyst::error::Error are imported and visible in the current scope. This is due to how Rust macros work.


This allows the use of an enum as an ID for the Widgets resource. 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!