EasyEcs
API reference

QueryItem<T1..T9>

One query result: the entity and refs into its row. The QueryItem<T1..T9> struct of EasyEcs, the C# ECS: its members, parameters and complexity.

public readonly ref struct QueryItem<T1> where T1 : struct, IComponent
public readonly ref struct QueryItem<T1, T2> where T1 : struct, IComponent where T2 : struct, IComponent
public readonly ref struct QueryItem<T1, T2, T3> where T1 : struct, IComponent where T2 : struct, IComponent where T3 : struct, IComponent
public readonly ref struct QueryItem<T1, T2, T3, T4> where T1 : struct, IComponent where T2 : struct, IComponent where T3 : struct, IComponent where T4 : struct, IComponent
public readonly ref struct QueryItem<T1, T2, T3, T4, T5> where T1 : struct, IComponent where T2 : struct, IComponent where T3 : struct, IComponent where T4 : struct, IComponent where T5 : struct, IComponent
public readonly ref struct QueryItem<T1, T2, T3, T4, T5, T6> where T1 : struct, IComponent where T2 : struct, IComponent where T3 : struct, IComponent where T4 : struct, IComponent where T5 : struct, IComponent where T6 : struct, IComponent
public readonly ref struct QueryItem<T1, T2, T3, T4, T5, T6, T7> where T1 : struct, IComponent where T2 : struct, IComponent where T3 : struct, IComponent where T4 : struct, IComponent where T5 : struct, IComponent where T6 : struct, IComponent where T7 : struct, IComponent
public readonly ref struct QueryItem<T1, T2, T3, T4, T5, T6, T7, T8> where T1 : struct, IComponent where T2 : struct, IComponent where T3 : struct, IComponent where T4 : struct, IComponent where T5 : struct, IComponent where T6 : struct, IComponent where T7 : struct, IComponent where T8 : struct, IComponent
public readonly ref struct QueryItem<T1, T2, T3, T4, T5, T6, T7, T8, T9> where T1 : struct, IComponent where T2 : struct, IComponent where T3 : struct, IComponent where T4 : struct, IComponent where T5 : struct, IComponent where T6 : struct, IComponent where T7 : struct, IComponent where T8 : struct, IComponent where T9 : struct, IComponent

One query result: the entity and refs into its row. Like every ref into ECS storage, the refs are valid until the next structural change; re-read through QueryItem.Entity after one.

One type per number of components, 1 to 9 (generated from one template); the members below are those of each, shown for QueryItem<T1>.

Properties

Component1

public ref T1 Component1 { get; }

The current entity's T1, a reference into its row (the generator names it after the component: item.Position).

Entity

public Entity Entity { get; }

Handle of the current entity.

Edit on GitHub

Last updated on

How is this guide?

On this page