You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Fix synchronization of global class name
This commit is contained in:
@@ -706,23 +706,7 @@ void EditorNode::_notification(int p_what) {
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_READY: {
|
||||
{
|
||||
started_timestamp = Time::get_singleton()->get_unix_time_from_system();
|
||||
_initializing_plugins = true;
|
||||
Vector<String> addons;
|
||||
if (ProjectSettings::get_singleton()->has_setting("editor_plugins/enabled")) {
|
||||
addons = GLOBAL_GET("editor_plugins/enabled");
|
||||
}
|
||||
|
||||
for (int i = 0; i < addons.size(); i++) {
|
||||
set_addon_plugin_enabled(addons[i], true);
|
||||
}
|
||||
_initializing_plugins = false;
|
||||
|
||||
if (!pending_addons.is_empty()) {
|
||||
EditorFileSystem::get_singleton()->connect("script_classes_updated", callable_mp(this, &EditorNode::_enable_pending_addons));
|
||||
}
|
||||
}
|
||||
started_timestamp = Time::get_singleton()->get_unix_time_from_system();
|
||||
|
||||
RenderingServer::get_singleton()->viewport_set_disable_2d(get_scene_root()->get_viewport_rid(), true);
|
||||
RenderingServer::get_singleton()->viewport_set_environment_mode(get_viewport()->get_viewport_rid(), RenderingServer::VIEWPORT_ENVIRONMENT_DISABLED);
|
||||
@@ -860,6 +844,23 @@ void EditorNode::_update_update_spinner() {
|
||||
OS::get_singleton()->set_low_processor_usage_mode(!update_continuously);
|
||||
}
|
||||
|
||||
void EditorNode::init_plugins() {
|
||||
_initializing_plugins = true;
|
||||
Vector<String> addons;
|
||||
if (ProjectSettings::get_singleton()->has_setting("editor_plugins/enabled")) {
|
||||
addons = GLOBAL_GET("editor_plugins/enabled");
|
||||
}
|
||||
|
||||
for (const String &addon : addons) {
|
||||
set_addon_plugin_enabled(addon, true);
|
||||
}
|
||||
_initializing_plugins = false;
|
||||
|
||||
if (!pending_addons.is_empty()) {
|
||||
EditorFileSystem::get_singleton()->connect("script_classes_updated", callable_mp(this, &EditorNode::_enable_pending_addons), CONNECT_ONE_SHOT);
|
||||
}
|
||||
}
|
||||
|
||||
void EditorNode::_on_plugin_ready(Object *p_script, const String &p_activate_name) {
|
||||
Ref<Script> scr = Object::cast_to<Script>(p_script);
|
||||
if (scr.is_null()) {
|
||||
@@ -954,6 +955,7 @@ void EditorNode::_fs_changed() {
|
||||
// FIXME: Move this to a cleaner location, it's hacky to do this in _fs_changed.
|
||||
String export_error;
|
||||
Error err = OK;
|
||||
// It's important to wait for the first scan to finish; otherwise, scripts or resources might not be imported.
|
||||
if (!export_defer.preset.is_empty() && !EditorFileSystem::get_singleton()->is_scanning()) {
|
||||
String preset_name = export_defer.preset;
|
||||
// Ensures export_project does not loop infinitely, because notifications may
|
||||
|
||||
Reference in New Issue
Block a user