From 69d52ed081ac636a0ac696984c304c5284c902a7 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Wed, 14 Aug 2024 00:02:45 +0300 Subject: [PATCH] [.NET] Move search in files extension list definition to be after Scene level module init. --- core/config/project_settings.cpp | 9 --------- doc/classes/ProjectSettings.xml | 2 +- main/main.cpp | 8 ++++++++ 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index 37a2608c102..f231e4010f3 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -1489,15 +1489,6 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF(PropertyInfo(Variant::INT, "audio/general/ios/session_category", PROPERTY_HINT_ENUM, "Ambient,Multi Route,Play and Record,Playback,Record,Solo Ambient"), 0); GLOBAL_DEF("audio/general/ios/mix_with_others", false); - PackedStringArray extensions; - extensions.push_back("gd"); - if (ClassDB::class_exists("CSharpScript")) { - extensions.push_back("cs"); - } - extensions.push_back("gdshader"); - - GLOBAL_DEF(PropertyInfo(Variant::PACKED_STRING_ARRAY, "editor/script/search_in_file_extensions"), extensions); - _add_builtin_input_map(); // Keep the enum values in sync with the `DisplayServer::ScreenOrientation` enum. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index b20b374382e..fef42937920 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1000,7 +1000,7 @@ prime-run %command% [/codeblock] - + Text-based file extensions to include in the script editor's "Find in Files" feature. You can add e.g. [code]tscn[/code] if you wish to also parse your scene files, especially if you use built-in scripts which are serialized in the scene files. diff --git a/main/main.cpp b/main/main.cpp index e42469b51b0..a796a457f8a 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -3062,6 +3062,14 @@ Error Main::setup2(bool p_show_boot_logo) { OS::get_singleton()->benchmark_end_measure("Scene", "Modules and Extensions"); } + PackedStringArray extensions; + extensions.push_back("gd"); + if (ClassDB::class_exists("CSharpScript")) { + extensions.push_back("cs"); + } + extensions.push_back("gdshader"); + GLOBAL_DEF_NOVAL(PropertyInfo(Variant::PACKED_STRING_ARRAY, "editor/script/search_in_file_extensions"), extensions); // Note: should be defined after Scene level modules init to see .NET. + OS::get_singleton()->benchmark_end_measure("Startup", "Scene"); #ifdef TOOLS_ENABLED