BitQuirky.Behavior.Editor.Authoring
Public behavior trees and state machines: editor backend symbols in BitQuirky.Behavior.Editor.Authoring.
Source snapshot 29003d8b1658.
On this page
Assembly: BitQuirky.Behavior.Editor.Backend
BehaviorSourceAssetMenu
Section titled “BehaviorSourceAssetMenu”Category: Source authoring
class BitQuirky.Behavior.Editor.Authoring.BehaviorSourceAssetMenuSource declaration: Packages/io.bitquirky.behavior/Editor/Authoring/BehaviorSourceAssetMenu.cs:24-148
Creates canonical behavior source assets from Unity’s Assets menu.
Responsibilities:
- Write one valid empty source ready for root insertion and select its imported asset.
- Close clean Behavior Tree Editor windows and reject dirty sessions before ordinary external asset mutation.
- Let the hosted-tree workflow create its new asset without disposing the editing session that must still assign that asset.
Does NOT:
- Add sample-specific nodes or runtime bindings.
- Let general asset creation bypass editor ownership checks.
Members
Section titled “Members”DefaultAssetPath
Section titled “DefaultAssetPath”public const string DefaultAssetPath = "Assets/New Behavior Tree.bqbehavior"Source declaration: Packages/io.bitquirky.behavior/Editor/Authoring/BehaviorSourceAssetMenu.cs:36
Default project-relative path proposed for a new behavior source.
InitialSource
Section titled “InitialSource”public const string InitialSource = "%% behavior-version: 1.0.0\n%% layer: behavior\n%% fields:\n%% services:\nflowchart TD\n"Source declaration: Packages/io.bitquirky.behavior/Editor/Authoring/BehaviorSourceAssetMenu.cs:39-44
Valid canonical source written for a newly created behavior tree.
InitialStateMachineSource
Section titled “InitialStateMachineSource”public const string InitialStateMachineSource = "%% behavior-version: 1.0.0\n%% layer: behavior\n%% source-format: bitquirky.behavior/1.1\n%% validation-profile: action_state_machine\n%% fields:\n%% field-types:\n%% services:\nflowchart TD\n%% authority=host-authoritative read= write= waits=\n%% layout: { x: 80, y: 120 }\nstate_machine[[\"state machine\"]]:::root\n"Source declaration: Packages/io.bitquirky.behavior/Editor/Authoring/BehaviorSourceAssetMenu.cs:47-58
Canonical empty source written for a new action State Machine.
CreateAtPath(string assetPath)
Section titled “CreateAtPath(string assetPath)”public static void CreateAtPath(string assetPath)Source declaration: Packages/io.bitquirky.behavior/Editor/Authoring/BehaviorSourceAssetMenu.cs:86-89
Writes and synchronously imports a new canonical behavior source at
assetPath.
CreateStateMachineAtPath(string assetPath)
Section titled “CreateStateMachineAtPath(string assetPath)”public static void CreateStateMachineAtPath(string assetPath)Source declaration: Packages/io.bitquirky.behavior/Editor/Authoring/BehaviorSourceAssetMenu.cs:104-107
Writes and synchronously imports an empty action State Machine source.
BehaviorSourceAssetOpenHandler
Section titled “BehaviorSourceAssetOpenHandler”Category: Source authoring
class BitQuirky.Behavior.Editor.Authoring.BehaviorSourceAssetOpenHandlerSource declaration: Packages/io.bitquirky.behavior/Editor/Authoring/BehaviorSourceAssetOpenHandler.cs:23-181
Routes imported behavior sources into the Static behavior editor.
Responsibilities:
- Materialize an editor-owned artifact and open the existing Static window.
Does NOT:
- Parse source at runtime or retain native ownership outside the binding.
Members
Section titled “Members”Open(BehaviorSourceAsset asset)
Section titled “Open(BehaviorSourceAsset asset)”public static bool Open(BitQuirky.Behavior.Authoring.BehaviorSourceAsset asset)Source declaration: Packages/io.bitquirky.behavior/Editor/Authoring/BehaviorSourceAssetOpenHandler.cs:53-56
Opensassetin a Static editor and returns whether the asset was
a supported behavior source.
BehaviorSourceBuildValidator
Section titled “BehaviorSourceBuildValidator”Category: Source authoring
class BitQuirky.Behavior.Editor.Authoring.BehaviorSourceBuildValidatorSource declaration: Packages/io.bitquirky.behavior/Editor/Authoring/BehaviorSourceBuildValidator.cs:40-1126
Implements: IPreprocessBuildWithReport, IProcessSceneWithReport
Blocks player builds when an included behavior source lacks a valid derived cache and resolves unambiguous legacy host component roles before serialization.
Responsibilities:
- Discover behavior sources reachable from player scenes, preloaded assets, Resources, asset bundles, and installed Addressables settings.
- Validate only included sources while keeping direct path validation fail-closed.
- Serialize exact unambiguous local host-role references into build scenes and included prefabs without adding runtime discovery.
Does NOT:
- Repair invalid sources, substitute executable defaults, or choose between ambiguous component implementations.
Members
Section titled “Members”callbackOrder
Section titled “callbackOrder”public int callbackOrder { get; }Source declaration: Packages/io.bitquirky.behavior/Editor/Authoring/BehaviorSourceBuildValidator.cs:45
Runs before the default player-build callbacks.
OnPreprocessBuild(BuildReport report)
Section titled “OnPreprocessBuild(BuildReport report)”public void OnPreprocessBuild(UnityEditor.Build.Reporting.BuildReport report)Source declaration: Packages/io.bitquirky.behavior/Editor/Authoring/BehaviorSourceBuildValidator.cs:48-53
Validates every behavior source reachable by a player loading contract.
OnProcessScene(Scene scene, BuildReport report)
Section titled “OnProcessScene(Scene scene, BuildReport report)”public void OnProcessScene(UnityEngine.SceneManagement.Scene scene, UnityEditor.Build.Reporting.BuildReport report)Source declaration: Packages/io.bitquirky.behavior/Editor/Authoring/BehaviorSourceBuildValidator.cs:56-70
Resolves exact references on the build pipeline’s serialized scene copy.
RequireTargetSurface(BehaviorSourceAsset asset, string graphIdentity, BehaviorAgentSurface surface)
Section titled “RequireTargetSurface(BehaviorSourceAsset asset, string graphIdentity, BehaviorAgentSurface surface)”public static void RequireTargetSurface(BitQuirky.Behavior.Authoring.BehaviorSourceAsset asset, string graphIdentity, BitQuirky.Behavior.Member.BehaviorAgentSurface surface)Source declaration: Packages/io.bitquirky.behavior/Editor/Authoring/BehaviorSourceBuildValidator.cs:412-424
Throws a build failure when a graph assigned to the entity path declares a value that path cannot carry, naming every uncarried variable at once.
ValidateAssetPaths(IReadOnlyList<string> assetPaths)
Section titled “ValidateAssetPaths(IReadOnlyList<string> assetPaths)”public static void ValidateAssetPaths(System.Collections.Generic.IReadOnlyList<string> assetPaths)Source declaration: Packages/io.bitquirky.behavior/Editor/Authoring/BehaviorSourceBuildValidator.cs:76-132
Throws a build failure when any supplied behavior source path lacks a clean, executable imported cache.
ValidateTargetSurface(BehaviorSourceAsset asset, string graphIdentity, BehaviorAgentSurface surface)
Section titled “ValidateTargetSurface(BehaviorSourceAsset asset, string graphIdentity, BehaviorAgentSurface surface)”public static System.Collections.Generic.IReadOnlyList<BitQuirky.Behavior.Member.BehaviorArtifactCompatibilityDiagnostic> ValidateTargetSurface(BitQuirky.Behavior.Authoring.BehaviorSourceAsset asset, string graphIdentity, BitQuirky.Behavior.Member.BehaviorAgentSurface surface)Source declaration: Packages/io.bitquirky.behavior/Editor/Authoring/BehaviorSourceBuildValidator.cs:381-406
Validates one imported graph against a known target agent surface. This is the same verdict the entity runtime reaches, run at author time when entity target intent is known, so a graph is blocked before any tick rather than at attachment. It never blocks authoring: the variable and its value stay editable.
BehaviorSourceImporterBackend
Section titled “BehaviorSourceImporterBackend”Category: Source authoring
class BitQuirky.Behavior.Editor.Authoring.BehaviorSourceImporterBackendSource declaration: Packages/io.bitquirky.behavior/Editor/Authoring/BehaviorSourceImporter.cs:35-623
Package-owned importer for canonical behavior source files.
Responsibilities:
- Preserve exact source text and structured diagnostics.
- Resolve GUID and legacy-path subgraphs, register source dependencies, and derive one deterministic executable cache from valid Behavior Tree and referenced State Machine sources while keeping every referenced machine a separate canonical asset. Does NOT:
- Modify source text or create a second authoritative asset.
Members
Section titled “Members”BehaviorSourceExtension
Section titled “BehaviorSourceExtension”public const string BehaviorSourceExtension = "bqbehavior"Source declaration: Packages/io.bitquirky.behavior/Editor/Authoring/BehaviorSourceImporter.cs:44
File extension owned exclusively by the package importer.
ComposeProjectSource(string assetPath, string sourceText, Action<string> resolvedSourceDependency)
Section titled “ComposeProjectSource(string assetPath, string sourceText, Action<string> resolvedSourceDependency)”public static BitQuirky.Behavior.Authoring.BehaviorSourceCompositionResult ComposeProjectSource(string assetPath, string sourceText, System.Action<string> resolvedSourceDependency = null)Source declaration: Packages/io.bitquirky.behavior/Editor/Authoring/BehaviorSourceImporter.cs:197-211
Composes one project source through the importer’s authoritative GUID/path resolver. An optional observer receives every transitively resolved source path so importers can register the exact dependency set traversed by the shared expansion engine.
Source fingerprint: sha256:29003d8b1658b98a79bebcd93e3b4030caf8511268b96817ab764d63df8d6c3b