Fix bug in BT sub tree knowledge type validation

This commit is contained in:
2026-09-25 00:30:00 +02:00
parent f4f8e4e005
commit 3feed2ad8f
+1 -1
View File
@@ -361,7 +361,7 @@ BehaviorUpdateResult BehaviorTreeSubTreeNode::Update(const BehaviorUpdateContext
{
// Validate if nested tree blackboard data matches (the same type or base type)
const VariantType& blackboardType = context.Knowledge->Blackboard.Type;
if (IsAssignableFrom(treeBlackboardType, StringAnsiView(blackboardType.GetTypeName())))
if (!IsAssignableFrom(treeBlackboardType, StringAnsiView(blackboardType.GetTypeName())))
{
LOG(Error, "Cannot use nested '{}' with Blackboard of type '{}' inside '{}' with Blackboard of type '{}'",
tree->ToString(), String(treeBlackboardType),