From 616beb1041cc5850b882e7cab64a6e19d00aef42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 21 Dec 2018 12:20:48 +0100 Subject: ProjectManager: Warn when projects have different config_version When opening projects for edition through the project manager, the following checks are now done: 1. If the config_version is lower than the one used by the current engine version, users are asked if they want to convert to the new format or abort editing. Fixes #20626. 2. If the config_version is higher than the expected one (project from a more recent and incompatible engine version), projects are grayed out and can't be edited. Fixes #18758. When editing from the command line, the behaviour is unchanged: projects in situation (1) are automatically converted, while projects in situation (2) show an error message (made more explicit). The "Run" option from the project manager was not changed, so it will still run (1) projects without converting them, and fail running (2) projects. Co-authored-by: groud --- core/project_settings.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/project_settings.h') diff --git a/core/project_settings.h b/core/project_settings.h index c790669048..2cb159e1c7 100644 --- a/core/project_settings.h +++ b/core/project_settings.h @@ -106,7 +106,7 @@ protected: Error _save_custom_bnd(const String &p_file); - void _convert_to_last_version(); + void _convert_to_last_version(int p_from_version); bool _load_resource_pack(const String &p_pack); @@ -118,6 +118,8 @@ protected: static void _bind_methods(); public: + static const int CONFIG_VERSION = 4; + void set_setting(const String &p_setting, const Variant &p_value); Variant get_setting(const String &p_setting) const; -- cgit v1.2.3