summaryrefslogtreecommitdiffstats
path: root/core/config/project_settings.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-10-05 21:02:27 +0200
committerGitHub <noreply@github.com>2021-10-05 21:02:27 +0200
commita7ba22763139b29d825e0f4ef3e718533da069ea (patch)
tree63e38379d45985297d0e3250bdc3d6bd025c4f25 /core/config/project_settings.cpp
parent869a618e542252a42d0f5feab18a7916aec7109d (diff)
parent69f890ff11a15cc2c1aa651801a872505ab08c81 (diff)
downloadredot-engine-a7ba22763139b29d825e0f4ef3e718533da069ea.tar.gz
Merge pull request #52711 from m4gr3d/provide_getter_for_project_data_dir_master
Diffstat (limited to 'core/config/project_settings.cpp')
-rw-r--r--core/config/project_settings.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp
index 85e83ff7f2..57833fe42f 100644
--- a/core/config/project_settings.cpp
+++ b/core/config/project_settings.cpp
@@ -48,11 +48,22 @@ ProjectSettings *ProjectSettings::get_singleton() {
return singleton;
}
+String ProjectSettings::get_project_data_dir_name() const {
+ return ".godot";
+}
+
+String ProjectSettings::get_project_data_path() const {
+ String project_data_dir_name = get_project_data_dir_name();
+ return "res://" + project_data_dir_name;
+}
+
String ProjectSettings::get_resource_path() const {
return resource_path;
}
-const String ProjectSettings::IMPORTED_FILES_PATH("res://.godot/imported");
+String ProjectSettings::get_imported_files_path() const {
+ return get_project_data_path().plus_file("imported");
+}
String ProjectSettings::localize_path(const String &p_path) const {
if (resource_path.is_empty() || p_path.begins_with("res://") || p_path.begins_with("user://") ||