Code generation simular to arch ecs.

#122 · closed · 2 comments

View on GitHub ↗

Shadowblitz16

It would be nice if we could write methods that we can call like a function that would loop over the components for us. ```cs public static partial class Queries { [All<ComponentA, ComponentB>, None<ComponentC>] private static void UpdateA(ref ComponentA a, ref ComponentB b) { a.Value += b.Value; } } Queries.UpdateAQuery(world); ``` We would need support for passing data and getting the entity and world though.

Comments

friflo

Not planned. For now I want to avoid the need of a code generator. This type feature could also be added by an external library.

friflo

Changed my mind and started to implement a Query Generator. https://github.com/friflo/Friflo.Engine.ECS/issues/124