Merge pull request #79920 from KoBeWi/most_sane_path
Automatically add path to built-in scripts
This commit is contained in:
commit
9948f03344
1 changed files with 4 additions and 0 deletions
|
@ -2074,6 +2074,10 @@ void SceneTreeDock::_script_created(Ref<Script> p_script) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (p_script->is_built_in()) {
|
||||
p_script->set_path(edited_scene->get_scene_file_path() + "::");
|
||||
}
|
||||
|
||||
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
|
||||
undo_redo->create_action(TTR("Attach Script"), UndoRedo::MERGE_DISABLE, selected.front()->get());
|
||||
for (Node *E : selected) {
|
||||
|
|
Loading…
Reference in a new issue