mirror of
https://github.com/godotengine/godot.git
synced 2025-01-08 11:11:55 +00:00
Merge pull request #22645 from merumelu/plugin-ready-path
PluginConfigDialog: pass subfolder name instead of plugin name on creation
This commit is contained in:
commit
d675d04f09
@ -76,7 +76,10 @@ void PluginConfigDialog::_on_confirmed() {
|
|||||||
"extends EditorPlugin\n"
|
"extends EditorPlugin\n"
|
||||||
"\n"
|
"\n"
|
||||||
"func _enter_tree():\n"
|
"func _enter_tree():\n"
|
||||||
"\tpass");
|
"\tpass\n"
|
||||||
|
"\n"
|
||||||
|
"func _exit_tree():\n"
|
||||||
|
"\tpass\n");
|
||||||
String script_path = path.plus_file(script_edit->get_text());
|
String script_path = path.plus_file(script_edit->get_text());
|
||||||
gdscript->set_path(script_path);
|
gdscript->set_path(script_path);
|
||||||
ResourceSaver::save(script_path, gdscript);
|
ResourceSaver::save(script_path, gdscript);
|
||||||
@ -84,7 +87,7 @@ void PluginConfigDialog::_on_confirmed() {
|
|||||||
}
|
}
|
||||||
//TODO: other languages
|
//TODO: other languages
|
||||||
|
|
||||||
emit_signal("plugin_ready", script.operator->(), active_edit->is_pressed() ? name_edit->get_text() : "");
|
emit_signal("plugin_ready", script.operator->(), active_edit->is_pressed() ? subfolder_edit->get_text() : "");
|
||||||
} else {
|
} else {
|
||||||
EditorNode::get_singleton()->get_project_settings()->update_plugins();
|
EditorNode::get_singleton()->get_project_settings()->update_plugins();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user