Fix BTInstance not registered with debugger on BTPlayer.set_bt_instance() (#275)

This commit is contained in:
Serhii Snitsaruk 2025-01-21 23:43:52 +01:00 committed by GitHub
parent 1b9cf17339
commit 76e02a75e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -91,6 +91,11 @@ void BTPlayer::set_bt_instance(const Ref<BTInstance> &p_bt_instance) {
blackboard = p_bt_instance->get_blackboard(); blackboard = p_bt_instance->get_blackboard();
agent_node = p_bt_instance->get_agent()->get_path(); agent_node = p_bt_instance->get_agent()->get_path();
#ifdef DEBUG_ENABLED
bt_instance->set_monitor_performance(monitor_performance);
bt_instance->register_with_debugger();
#endif // DEBUG_ENABLED
blackboard_plan.unref(); blackboard_plan.unref();
behavior_tree.unref(); behavior_tree.unref();
} }