Skip to content

EnumerableQuery

Martin Evans edited this page Aug 1, 2024 · 2 revisions

A enumerable query returns results as an enumerable, which can be used in a normal foreach loop.

foreach (var (entity, c1, c2) in world.Query<Component1, Component2>())
    p.Ref.Value += v.Ref.Value;

This is the slowest query method, but is often the most convenient and offers the ability to break out of the loop early.

Clone this wiki locally