public readonly record struct BehaviorBuildContextEverything a node factory needs to turn one row of a file into an object.
Remarks
⚠ A factory reads its fields through here rather than off the dictionary. The dictionary holds what a file happened to say; this applies the declared default when it said nothing, resolves a key name to the index the runtime uses, and reports a name that is not on the blackboard instead of quietly binding key zero.
Fields and properties (4)
public BehaviorNodeType TypeIts declaration in the schema, which is where the defaults and the field list live.
public BlackboardLayout LayoutThe blackboard the tree's keys were compiled into.
public IReadOnlyDictionary<string, string> FieldsWhat the file said.
public ICollection<BehaviorTreeDiagnostic> DiagnosticsWhere to say what could not be resolved.
Methods (9)
public BehaviorBuildContext(BehaviorNodeType Type, BlackboardLayout Layout, IReadOnlyDictionary<string, string> Fields, ICollection<BehaviorTreeDiagnostic> Diagnostics)Everything a node factory needs to turn one row of a file into an object.
public string Text(string field)A field's text.
public float Number(string field)A field as a number.
public int Integer(string field)A field as a whole number.
public bool Toggle(string field)A field as a switch.
public T Choice<T>(string field) where T : struct, EnumA field as one of an enumeration's names.
public Symbol Word(string field)A field as an interned word.
public BlackboardKey Key(string field)A field naming a blackboard key, resolved to its index.
public void Report(string message)Records a problem with this row.
Used by (5)
- BehaviorTreeResolverVixen.Ai
- BuildStateVixen.Ai
- PerceptionNodesVixen.Ai.Perception
- QueryNodesVixen.Ai.Nodes
- WorldNodesVixen.Ai.Nodes