Vixen
c7401864
csharp
public sealed class BehaviorTreeImporter

Compiles a .vxbt.

Read the guide page for this →

As a importer

Extensions
.vxbt

Remarks

⚠ The artefact is the tree's data, not a compiled template. A BehaviorTreeTemplate holds live decorator objects and action indices into a registry a game builds at start-up, so there is nothing there to write bytes for. What travels is BehaviorTreeContent, and a game turns it into a template through BehaviorTreeContentCompiler against its own registries — which is the same two-step every asset with code on the other side of it takes.

⚠ What the importer adds over copying the file is the checking. A tree whose keys collide, whose composite has no children, whose parallel's first child is not a task, or whose decorator observes nothing it reads, is a tree that fails at run time in a way that reads as "the AI sometimes gets stuck" — so it fails the build instead. What it cannot check is a task naming an action a game registers in code, and those are reported as remarks rather than errors for AnimationGraphCompiler's reason: laying out a tree before the code exists is the ordinary order of work.

Fields and properties (2)

  • public const string TreeType

    The alias of the type this writes.

  • public override int Version

    Its own version. Bumping it invalidates every artefact it has ever produced, which is the whole mechanism for "I fixed the mip filter, re-import everything".

Methods (1)