genaray/Arch

About runtime QueryDescription creation

Closed this issue · 1 comments

Hello!

I can create QueryDescription like new QueryDescription().WithAll<Component1, Component2>().

To do this I need to know the types at compile time. But sometimes I know types only at runtime.

Can I use QueryDescription.All manually in that case? I call ComponentRegistry.Add(Type) for every type I need to add to All array.
By reading the code I didn't find any pitfalls, but maybe I missed something?

Thats possible with new QueryDescription { All = new ComponentType[] { typeof(Transform), typeof(Velocity)}, None = ...}; :) It's basically the same.