Reload built in script to get its methods on signal connection

This commit is contained in:
Hakim 2023-03-06 16:20:30 +01:00
parent 2267646bf4
commit 5aa8b9ee61
1 changed files with 3 additions and 0 deletions

View File

@ -343,6 +343,9 @@ void ConnectDialog::_update_method_tree() {
si_item->set_icon(0, get_theme_icon(SNAME("Script"), SNAME("EditorIcons"))); si_item->set_icon(0, get_theme_icon(SNAME("Script"), SNAME("EditorIcons")));
si_item->set_selectable(0, false); si_item->set_selectable(0, false);
if (si->get_script()->is_built_in()) {
si->get_script()->reload();
}
List<MethodInfo> methods; List<MethodInfo> methods;
si->get_method_list(&methods); si->get_method_list(&methods);
methods = _filter_method_list(methods, signal_info, search_string); methods = _filter_method_list(methods, signal_info, search_string);