Vixen
caa30e12
csharp
public readonly record struct QueryBinding

Where a query run gets its origin, and where its answer goes.

Read the guide page for this →

Remarks

⚠ Two result keys, not one. A query over entities answers with an entity and a query over a grid answers with a position, and a node that wrote only the position would have thrown away the whole point of the first — while one that wrote only the entity would have nothing to say about the second. Both are written when both are known; the entity key is cleared when the winning point came from no entity, because a stale entity is worse than none.

⚠ The optional keys are BlackboardKey? and not BlackboardKey, because default(BlackboardKey) is key zero and not an invalid one. A binding that left the entity key unset would silently name the first key on the board — which in this node's case meant clearing the very key it had just written. Perception's bindings are nullable for the same reason and it cost a failing test to find there too.

Fields and properties (4)

  • public EnvironmentQuery Query

    The query to run.

  • public BlackboardKey? Context

    A key naming what the query is about, or invalid for none.

  • public BlackboardKey? Result

    A Vector3 key the best point is written to.

  • public BlackboardKey? ResultEntity

    An Entity key the best point's entity is written to, or invalid.

Methods (1)

Used by (5)

  • QueryNodesVixen.Ai.Nodes
  • QueryRunnerVixen.Ai.Nodes
  • RunQueryNodeTestsVixen.Ai.Nodes.Tests
  • RunQueryServiceVixen.Ai.Nodes
  • RunQueryTaskVixen.Ai.Nodes