diff options
author | Juan Linietsky <reduzio@gmail.com> | 2023-01-31 10:52:43 +0100 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2023-01-31 11:28:21 +0100 |
commit | 79897dd5bc75bb0553a48fd36537454f5ad95764 (patch) | |
tree | 75f3f4808bd1d08644dcd52eeb5be28072b5baef /core/object | |
parent | e9de988020f3d46c3e7b4fd5a8a80724996035e0 (diff) |
Restore script class cache if removed
I have no idea why anyone would do this, but this fixes it.
Fixes #72154. Depends on #72444 being merged to function properly.
Diffstat (limited to 'core/object')
-rw-r--r-- | core/object/script_language.cpp | 8 | ||||
-rw-r--r-- | core/object/script_language.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/core/object/script_language.cpp b/core/object/script_language.cpp index df5486512d..61f5cfc22a 100644 --- a/core/object/script_language.cpp +++ b/core/object/script_language.cpp @@ -369,6 +369,14 @@ void ScriptServer::save_global_classes() { ProjectSettings::get_singleton()->store_global_class_list(gcarr); } +bool ScriptServer::has_global_classes() { + return !global_classes.is_empty(); +} + +String ScriptServer::get_global_class_cache_file_path() { + return ProjectSettings::get_singleton()->get_global_class_list_path(); +} + //////////////////// Variant ScriptInstance::call_const(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { diff --git a/core/object/script_language.h b/core/object/script_language.h index f82b58439f..b1393c7196 100644 --- a/core/object/script_language.h +++ b/core/object/script_language.h @@ -91,6 +91,8 @@ public: static void get_global_class_list(List<StringName> *r_global_classes); static void get_inheriters_list(const StringName &p_base_type, List<StringName> *r_classes); static void save_global_classes(); + static bool has_global_classes(); + static String get_global_class_cache_file_path(); static void init_languages(); static void finish_languages(); |