When using an Entity prefab converted from a GameObject prefab that has a BehaviorTree MonoBehaviour (via a custom Baker that only stores an EntityPrefabReference and instantiates it at runtime), the behavior tree systems EvaluationCleanupSystem and InterruptedCleanupSystem are never created or added to the BehaviorTreeSystemGroup.
In this setup there is no BehaviorTree MonoBehaviour in the scene at runtime, so StartBehavior / InitializeBranch() are never called, and the code that would normally register the cleanup systems is never executed.
As a result, DetermineEvaluationSystem disables EvaluateFlag as expected, but because the cleanup systems are missing, the flag is never re-enabled, and all subsequent task systems that require .WithAll<EvaluateFlag>() stop running entirely.
Behavior trees instantiated from these converted Entity prefabs therefore execute only once and then never tick again.
This does not happen when using the standard MonoBehaviour workflow, because StartBehavior → InitializeBranch() automatically registers EvaluationCleanupSystem and InterruptedCleanupSystem.
Additionally, because at runtime there is no BehaviorTree MonoBehaviour in the scene, the Behavior Designer Editor Debugger cannot track or visualize the tree’s runtime execution.
If this “Entity-only” workflow (GameObject prefab with BehaviorTree → custom Baker → EntityPrefabReference → ECS instantiation) is intended to be supported, I would like to know what you recommend as the proper way to debug behavior trees in ECS-only setups, given that the current editor debugging tools appear to rely on a live BehaviorTree MonoBehaviour instance.
In this setup there is no BehaviorTree MonoBehaviour in the scene at runtime, so StartBehavior / InitializeBranch() are never called, and the code that would normally register the cleanup systems is never executed.
As a result, DetermineEvaluationSystem disables EvaluateFlag as expected, but because the cleanup systems are missing, the flag is never re-enabled, and all subsequent task systems that require .WithAll<EvaluateFlag>() stop running entirely.
Behavior trees instantiated from these converted Entity prefabs therefore execute only once and then never tick again.
This does not happen when using the standard MonoBehaviour workflow, because StartBehavior → InitializeBranch() automatically registers EvaluationCleanupSystem and InterruptedCleanupSystem.
Additionally, because at runtime there is no BehaviorTree MonoBehaviour in the scene, the Behavior Designer Editor Debugger cannot track or visualize the tree’s runtime execution.
If this “Entity-only” workflow (GameObject prefab with BehaviorTree → custom Baker → EntityPrefabReference → ECS instantiation) is intended to be supported, I would like to know what you recommend as the proper way to debug behavior trees in ECS-only setups, given that the current editor debugging tools appear to rely on a live BehaviorTree MonoBehaviour instance.