diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-13 18:03:15 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-13 18:03:15 +0100 |
commit | 8716c12eadc571b38bb571d4b7a3c781593a9b5b (patch) | |
tree | 144592c02a2921190e537feeedd32b561020fe67 /doc | |
parent | ef01b492275e2ebdc3769f3e4ffa925884c1e4b1 (diff) | |
parent | 6f0e210093dbd3f20bec34a4e60861dcceabd484 (diff) |
Merge pull request #71325 from reduz/refactor-project-setting-overrides
Refactor ProjectSetting overrides
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/ProjectSettings.xml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index cfcfca9880..f954e8bca8 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -84,6 +84,25 @@ GD.Print(ProjectSettings.GetSetting("application/config/custom_description", "No description specified.")); [/csharp] [/codeblocks] + [b]Note:[/b] This method doesn't take potential feature overrides into account automatically. Use [method get_setting_with_override] to handle seamlessly. + </description> + </method> + <method name="get_setting_with_override" qualifiers="const"> + <return type="Variant" /> + <param index="0" name="name" type="StringName" /> + <description> + Similar to [method get_setting], but applies feature tag overrides if any exists and is valid. + [b]Example:[/b] + If the following setting override exists "application/config/name.windows", and the following code is executed: + [codeblocks] + [gdscript] + print(ProjectSettings.get_setting_with_override("application/config/name")) + [/gdscript] + [csharp] + GD.Print(ProjectSettings.GetSettingWithOverride("application/config/name")); + [/csharp] + [/codeblocks] + Then the overridden setting will be returned instead if the project is running on the [i]Windows[/i] operating system. </description> </method> <method name="globalize_path" qualifiers="const"> |