Automatically add path to built-in scripts
(cherry picked from commit ed6ad376c6
)
This commit is contained in:
parent
9332a2b387
commit
ef1d0cda30
|
@ -2053,6 +2053,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 New Issue