Open
Description
What problem does this solve or what need does it fill?
There may be times where we might want an entity to have multiple relationships pointing to it (which I have recently encountered) however currently the only way to do this is to define two components for each relationship we want to add.
What solution would you like?
#[derive(Component)]
#[relationship_target]
pub struct Army {
#[relationship = Unit]
units: Vec<Entity>,
#[relationship = Commander]
commander: Entity
}
#[derive(Component)]
#[relationship(relationship_target = Army)]
pub struct Commander(Entity);
#[derive(Component)]
#[relationship(relationship_target = Army)]
pub struct Unit(Entity);
If this is done it may be a good idea to allow Option as a relationship target to allow for the case that there is no commander, while the army still exists.
What alternative(s) have you considered?
The current solution, however this can get quickly verbose when you consider two or more relationships