Fix error when clicking resource header in debugger with a scene-embedded BT

This commit is contained in:
Serhii Snitsaruk 2024-03-20 14:19:49 +01:00
parent d9a9a1d4e5
commit 5a8fe97aac
No known key found for this signature in database
GPG Key ID: A965EF8799FFEC2D
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ void LimboDebuggerTab::_resource_header_pressed() {
if (bt_path.is_empty()) { if (bt_path.is_empty()) {
return; return;
} }
FS_DOCK_SELECT_FILE(bt_path); FS_DOCK_SELECT_FILE(bt_path.get_slice("::", 0));
Ref<BehaviorTree> bt = RESOURCE_LOAD(bt_path, "BehaviorTree"); Ref<BehaviorTree> bt = RESOURCE_LOAD(bt_path, "BehaviorTree");
ERR_FAIL_COND_MSG(!bt.is_valid(), "Failed to load BehaviorTree. Wrong resource path?"); ERR_FAIL_COND_MSG(!bt.is_valid(), "Failed to load BehaviorTree. Wrong resource path?");
EditorInterface::get_singleton()->edit_resource(bt); EditorInterface::get_singleton()->edit_resource(bt);