1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

Merge pull request #78615 from RandomShaper/fix_doc_cache

Re-enable docs cache with fixes
This commit is contained in:
Yuri Sizov
2023-07-26 18:39:22 +02:00
6 changed files with 26 additions and 45 deletions

View File

@@ -878,6 +878,13 @@ EditorSettings *EditorSettings::get_singleton() {
return singleton.ptr();
}
void EditorSettings::ensure_class_registered() {
ClassDB::APIType prev_api = ClassDB::get_current_api();
ClassDB::set_current_api(ClassDB::API_EDITOR);
GDREGISTER_CLASS(EditorSettings); // Otherwise it can't be unserialized.
ClassDB::set_current_api(prev_api);
}
void EditorSettings::create() {
// IMPORTANT: create() *must* create a valid EditorSettings singleton,
// as the rest of the engine code will assume it. As such, it should never
@@ -888,7 +895,7 @@ void EditorSettings::create() {
return;
}
GDREGISTER_CLASS(EditorSettings); // Otherwise it can't be unserialized.
ensure_class_registered();
String config_file_path;
Ref<ConfigFile> extra_config = memnew(ConfigFile);