Tags in Aspect

what is correct way to use them together?

i can filter it in foreach

foreach(var aspect in  SystemAPI.Query<MyAspect>().WithAll<MyTag>()) { ... }

but different tags may lead to different behaviour so should be different aspects

ofc i can do something like that:

public partial struct MyAspect : IAspect
{
  readonly RefRO<MyTag> myTag;
}

it works but throws warning of unused field and tags not have values anyway. also what to do to exclude tag?

maybe i missing some attributes like

[WithAll(typeof(MyTag)]
[WithNone(typeof(OtherTag)]
public partial struct MyAspect : IAspect {}

?

4 Likes

I just ran into this aswell. I guess for now you just filter for tags in your queries.