outfox / fennecs

... the tiny C# ECS that loves you back!
https://fennecs.tech
MIT License
223 stars 10 forks source link

`Ref<L>` for Entity does not work if you don't already HAVE the link object #18

Closed thygrrr closed 3 months ago

thygrrr commented 4 months ago

What: You can't get the backing link if you don't already have the link to identify it.

public ref L Ref<L>(Link<L> link) where L : class => ref _world.GetComponent<L>(this, link);

Potential Fix:

Probably need to create a specific function just for this, or allow ref to return an array-like for a Wildcard match expression.

thygrrr commented 3 months ago

Resolved in 0.5.8