#[derive(ProbarEntity)]
{
// Attributes available to this derive:
#[probar]
}
Expand description
Derive macro for type-safe entity markers.
Generates the ProbarEntity trait implementation which provides:
entity_name()- Returns the canonical string nameentity_type_id()- Returns a unique type identifier
§Attributes
#[probar(name = "custom_name")]- Override the entity name (defaults to snake_case)
§Example
ⓘ
#[derive(ProbarEntity)]
#[probar(name = "player")]
struct Player;
// Now usable as:
let player = game.entity::<Player>();