|
@@ -185,6 +185,7 @@ void EditorAutoloadSettings::_autoload_edited() {
|
|
if (path.begins_with("*"))
|
|
if (path.begins_with("*"))
|
|
path = path.substr(1, path.length());
|
|
path = path.substr(1, path.length());
|
|
|
|
|
|
|
|
+ // Singleton autoloads are represented with a leading "*" in their path.
|
|
if (checked)
|
|
if (checked)
|
|
path = "*" + path;
|
|
path = "*" + path;
|
|
|
|
|
|
@@ -651,6 +652,7 @@ void EditorAutoloadSettings::autoload_add(const String &p_name, const String &p_
|
|
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
|
|
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
|
|
|
|
|
|
undo_redo->create_action(TTR("Add AutoLoad"));
|
|
undo_redo->create_action(TTR("Add AutoLoad"));
|
|
|
|
+ // Singleton autoloads are represented with a leading "*" in their path.
|
|
undo_redo->add_do_property(ProjectSettings::get_singleton(), name, "*" + path);
|
|
undo_redo->add_do_property(ProjectSettings::get_singleton(), name, "*" + path);
|
|
|
|
|
|
if (ProjectSettings::get_singleton()->has_setting(name)) {
|
|
if (ProjectSettings::get_singleton()->has_setting(name)) {
|