diff options
author | Wesley Elliott <wesleyjasonelliott@gmail.com> | 2023-01-22 12:22:53 +0200 |
---|---|---|
committer | Wesley Elliott <wesleyjasonelliott@gmail.com> | 2023-01-22 12:30:55 +0200 |
commit | d0cdaadb326dd8b27ce3abe83d95013f9d3d6b88 (patch) | |
tree | 33f1f517fc7138fcdfeea2597d73972ddcaaa37a | |
parent | cd031fd31a8fdcdae1e93d1b20caf93230f0ac59 (diff) |
Use path instead of file name when updating script classes
The _script_class_file_to_path contains a map of paths to classes, but
when updating the script classes for new class names, the file name is
used instead. This meant new classes weren't able to be used in exported
variables until the project is reloaded (as the
_script_class_file_to_path is initially set with the full path)
Fixes #70718
-rw-r--r-- | editor/editor_file_system.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 16ecac4dac..fd44bff205 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -1543,7 +1543,7 @@ void EditorFileSystem::_update_script_classes() { ScriptServer::add_global_class(efd->files[index]->script_class_name, efd->files[index]->script_class_extends, lang, path); EditorNode::get_editor_data().script_class_set_icon_path(efd->files[index]->script_class_name, efd->files[index]->script_class_icon_path); - EditorNode::get_editor_data().script_class_set_name(efd->files[index]->file, efd->files[index]->script_class_name); + EditorNode::get_editor_data().script_class_set_name(path, efd->files[index]->script_class_name); } } |