public static class BehaviorTreeContentCompilerTurns the data in a .vxbt into the objects a tree is compiled from.
Remarks
The one direction between BehaviorTreeContent and BehaviorTreeAsset: data in, live decorators and registered actions out, and then BehaviorTreeCompiler flattens the result. Two steps rather than one because the second is the same one a tree built in code goes through, and a file should not be able to produce a template a hand-built tree could not.
⚠ Everything it cannot resolve is a diagnostic and a placeholder, never a refusal. Laying out a tree before the tasks exist is the ordinary order of work, and a compiler that refused would make the file unopenable until every name resolved. A task naming nothing becomes a FinishWith(Failed), so the topology is still checkable and the branch reads as the dead end it is.
Methods (3)
public static bool TryResolveTask(BehaviorTreeResolver resolver, BlackboardLayout layout, string type, Dictionary<string, string> fields, ICollection<BehaviorTreeDiagnostic> diagnostics, out ushort action)Resolves one task by name and registers it, for content that is not a tree.
public static BehaviorTreeAsset Build(BehaviorTreeContent content, BehaviorTreeResolver resolver, BlackboardLayout layout, ICollection<BehaviorTreeDiagnostic> diagnostics)Builds the authoring tree a compiler takes.
public static bool TryCompile(BehaviorTreeContent content, BehaviorTreeResolver resolver, out IReadOnlyList<BehaviorTreeDiagnostic> diagnostics, out BehaviorTreeTemplate? template)Builds and flattens in one call.
Used by (11)
- AuthorableNodeTestsVixen.Ai.Tests
- BehaviorTreeResolverReuseTestsVixen.Ai.Tests
- BuildStateVixen.Ai
- GoapDomainContentCompilerVixen.Ai
- PatrolChaseGiveUpTestsVixen.Ai.Nodes.Tests
- PerceptionNodeTestsVixen.Ai.Perception.Tests
- UtilitySetContentCompilerVixen.Ai
- WorldNodeRegistrationTestsVixen.Ai.Nodes.Tests
- BehaviorTreeDocumentVixen.Editor.AssetEditors
- BehaviorTreeImporterVixen.Editor.Assets
- LiveAgentVixen.Editor.AssetEditors.Tests