Navigate to subtree resource when clicked in editor (#276)
Co-authored-by: Steven Schoen <digisteve5@gmail.com>
This commit is contained in:
parent
76e02a75e5
commit
a6613c32f9
|
@ -893,6 +893,14 @@ void LimboAIEditor::_on_tree_task_activated() {
|
|||
Ref<Script> scr = selected->get_script();
|
||||
if (scr.is_valid()) {
|
||||
EDIT_SCRIPT(scr->get_path());
|
||||
} else if (IS_CLASS(selected, BTSubtree)) {
|
||||
Ref<BehaviorTree> subtree = static_cast<Ref<BTSubtree>>(selected)->get_subtree();
|
||||
if (subtree.is_valid()) {
|
||||
EDIT_RESOURCE(subtree);
|
||||
} else {
|
||||
LimboUtility::get_singleton()->open_doc_class(selected->get_class());
|
||||
}
|
||||
EDIT_RESOURCE(subtree);
|
||||
} else {
|
||||
LimboUtility::get_singleton()->open_doc_class(selected->get_class());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue