A delegate nested in ECSWorld, in three forms, one per number of component types: the callback of a query, called once for each entity that has all of the query’s types. The systems and queries page shows it in context, with code.
Each type argument is a component type, and each component comes by reference: a change made through it goes straight into the store. The references are valid for the call; don’t keep them.
One type
Signature: void QueryAction<T1>(Entity e, ref T1 c1)
| Parameter | Type | Description |
|---|---|---|
e |
Entity |
The entity that has the component. |
c1 |
ref T1 |
The entity’s T1. |
The callback of Query<T1>.
Two types
Signature: void QueryAction<T1, T2>(Entity e, ref T1 c1, ref T2 c2)
| Parameter | Type | Description |
|---|---|---|
e |
Entity |
The entity that has both components. |
c1 |
ref T1 |
The entity’s T1. |
c2 |
ref T2 |
The entity’s T2. |
The callback of Query<T1, T2>.
Three types
Signature: void QueryAction<T1, T2, T3>(Entity e, ref T1 c1, ref T2 c2, ref T3 c3)
| Parameter | Type | Description |
|---|---|---|
e |
Entity |
The entity that has the three components. |
c1 |
ref T1 |
The entity’s T1. |
c2 |
ref T2 |
The entity’s T2. |
c3 |
ref T3 |
The entity’s T3. |
The callback of Query<T1, T2, T3>.