2023-01-05 13:25:55 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								/**************************************************************************/  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/*  project_settings.cpp                                                  */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/**************************************************************************/  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/*                         This file is part of:                          */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/*                             GODOT ENGINE                               */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/*                        https://godotengine.org                         */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/**************************************************************************/  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/*                                                                        */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/* Permission is hereby granted, free of charge, to any person obtaining  */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/* a copy of this software and associated documentation files (the        */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/* "Software"), to deal in the Software without restriction, including    */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/* without limitation the rights to use, copy, modify, merge, publish,    */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/* distribute, sublicense, and/or sell copies of the Software, and to     */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/* permit persons to whom the Software is furnished to do so, subject to  */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/* the following conditions:                                              */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/*                                                                        */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/* The above copyright notice and this permission notice shall be         */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/* included in all copies or substantial portions of the Software.        */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/*                                                                        */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								/**************************************************************************/  
						 
					
						
							
								
									
										
										
										
											2018-01-05 00:50:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# include  "project_settings.h" 
  
						 
					
						
							
								
									
										
										
										
											2017-01-16 08:04:19 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-15 00:46:35 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# include  "core/core_bind.h"   // For Compression enum.
  
						 
					
						
							
								
									
										
										
										
											2020-12-07 21:31:51 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# include  "core/input/input_map.h" 
  
						 
					
						
							
								
									
										
										
										
											2022-12-25 15:08:32 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# include  "core/io/config_file.h" 
  
						 
					
						
							
								
									
										
										
										
											2021-06-11 14:51:48 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# include  "core/io/dir_access.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# include  "core/io/file_access.h" 
  
						 
					
						
							
								
									
										
										
										
											2018-09-11 18:13:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# include  "core/io/file_access_pack.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# include  "core/io/marshalls.h" 
  
						 
					
						
							
								
									
										
										
										
											2024-03-06 12:14:21 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# include  "core/io/resource_uid.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# include  "core/object/script_language.h" 
  
						 
					
						
							
								
									
										
										
										
											2024-03-03 15:33:24 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# include  "core/templates/rb_set.h" 
  
						 
					
						
							
								
									
										
										
										
											2023-02-03 20:37:52 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# include  "core/variant/typed_array.h" 
  
						 
					
						
							
								
									
										
										
										
											2020-11-07 19:33:38 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# include  "core/variant/variant_parser.h" 
  
						 
					
						
							
								
									
										
										
										
											2021-11-24 10:12:56 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# include  "core/version.h" 
  
						 
					
						
							
								
									
										
										
										
											2022-08-09 14:36:02 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# ifdef TOOLS_ENABLED 
  
						 
					
						
							
								
									
										
										
										
											2021-11-24 10:12:56 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# include  "modules/modules_enabled.gen.h"   // For mono.
  
						 
					
						
							
								
									
										
										
										
											2022-08-09 14:36:02 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# endif  // TOOLS_ENABLED
  
						 
					
						
							
								
									
										
										
										
											2018-09-11 18:13:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-10-13 13:56:18 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								const  String  ProjectSettings : : PROJECT_DATA_DIR_NAME_SUFFIX  =  " godot " ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-04-02 01:20:12 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								ProjectSettings  * ProjectSettings : : singleton  =  nullptr ;  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								ProjectSettings  * ProjectSettings : : get_singleton ( )  {  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  singleton ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-10 08:32:29 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								String  ProjectSettings : : get_project_data_dir_name ( )  const  {  
						 
					
						
							
								
									
										
										
										
											2021-09-10 08:32:29 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									return  project_data_dir_name ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-10 08:32:29 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								String  ProjectSettings : : get_project_data_path ( )  const  {  
						 
					
						
							
								
									
										
										
										
											2021-09-10 08:32:29 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									return  " res:// "  +  get_project_data_dir_name ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-10 08:32:29 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								String  ProjectSettings : : get_resource_path ( )  const  {  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  resource_path ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-19 15:46:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-10 08:32:29 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								String  ProjectSettings : : get_imported_files_path ( )  const  {  
						 
					
						
							
								
									
										
										
										
											2022-08-29 19:34:01 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									return  get_project_data_path ( ) . path_join ( " imported " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-10 08:32:29 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2020-07-05 20:55:43 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-08-09 14:36:02 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# ifdef TOOLS_ENABLED 
  
						 
					
						
							
								
									
										
										
										
											2021-11-24 10:12:56 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								// Returns the features that a project must have when opened with this build of Godot.
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								// This is used by the project manager to provide the initial_settings for config/features.
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								const  PackedStringArray  ProjectSettings : : get_required_features ( )  {  
						 
					
						
							
								
									
										
										
										
											2022-11-14 18:21:06 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									PackedStringArray  features ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-03 22:27:29 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									features . append ( GODOT_VERSION_BRANCH ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-24 10:12:56 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# ifdef REAL_T_IS_DOUBLE 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									features . append ( " Double Precision " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# endif 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  features ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								// Returns the features supported by this build of Godot. Includes all required features.
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								const  PackedStringArray  ProjectSettings : : _get_supported_features ( )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									PackedStringArray  features  =  get_required_features ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# ifdef MODULE_MONO_ENABLED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									features . append ( " C# " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# endif 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// Allow pinning to a specific patch number or build type by marking
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// them as supported. They're only used if the user adds them manually.
 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-03 22:27:29 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									features . append ( GODOT_VERSION_BRANCH  " . "  _MKSTR ( GODOT_VERSION_PATCH ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									features . append ( GODOT_VERSION_FULL_CONFIG ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									features . append ( GODOT_VERSION_FULL_BUILD ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-07 17:44:36 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-12-19 12:48:02 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# ifdef RD_ENABLED 
  
						 
					
						
							
								
									
										
										
										
											2022-09-07 17:44:36 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									features . append ( " Forward Plus " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									features . append ( " Mobile " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# endif 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# ifdef GLES3_ENABLED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									features . append ( " GL Compatibility " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# endif 
  
						 
					
						
							
								
									
										
										
										
											2021-11-24 10:12:56 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									return  features ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								// Returns the features that this project needs but this build of Godot lacks.
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								const  PackedStringArray  ProjectSettings : : get_unsupported_features ( const  PackedStringArray  & p_project_features )  {  
						 
					
						
							
								
									
										
										
										
											2022-11-14 18:21:06 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									PackedStringArray  unsupported_features ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-24 10:12:56 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									PackedStringArray  supported_features  =  singleton - > _get_supported_features ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									for  ( int  i  =  0 ;  i  <  p_project_features . size ( ) ;  i + + )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! supported_features . has ( p_project_features [ i ] ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-28 23:27:07 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											// Temporary compatibility code to ease upgrade to 4.0 beta 2+.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											if  ( p_project_features [ i ] . begins_with ( " Vulkan " ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												continue ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-24 10:12:56 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											unsupported_features . append ( p_project_features [ i ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									unsupported_features . sort ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  unsupported_features ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								// Returns the features that both this project has and this build of Godot has, ensuring required features exist.
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								const  PackedStringArray  ProjectSettings : : _trim_to_supported_features ( const  PackedStringArray  & p_project_features )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// Remove unsupported features if present.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									PackedStringArray  features  =  PackedStringArray ( p_project_features ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									PackedStringArray  supported_features  =  _get_supported_features ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									for  ( int  i  =  p_project_features . size ( )  -  1 ;  i  >  - 1 ;  i - - )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! supported_features . has ( p_project_features [ i ] ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											features . remove_at ( i ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// Add required features if not present.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									PackedStringArray  required_features  =  get_required_features ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									for  ( int  i  =  0 ;  i  <  required_features . size ( ) ;  i + + )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! features . has ( required_features [ i ] ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											features . append ( required_features [ i ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									features . sort ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  features ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2022-08-09 14:36:02 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# endif  // TOOLS_ENABLED
  
						 
					
						
							
								
									
										
										
										
											2021-11-24 10:12:56 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								String  ProjectSettings : : localize_path ( const  String  & p_path )  const  {  
						 
					
						
							
								
									
										
										
										
											2023-07-11 16:07:35 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									String  path  =  p_path . simplify_path ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( resource_path . is_empty ( )  | |  ( path . is_absolute_path ( )  & &  ! path . begins_with ( resource_path ) ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										return  path ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-19 18:23:20 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// Check if we have a special path (like res://) or a protocol identifier.
 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-11 16:07:35 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									int  p  =  path . find ( " :// " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-19 18:23:20 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									bool  found  =  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( p  >  0 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										found  =  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										for  ( int  i  =  0 ;  i  <  p ;  i + + )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-11 16:07:35 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											if  ( ! is_ascii_alphanumeric_char ( path [ i ] ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-19 18:23:20 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												found  =  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												break ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( found )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-11 16:07:35 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										return  path ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-03-23 11:08:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									Ref < DirAccess >  dir  =  DirAccess : : create ( DirAccess : : ACCESS_FILESYSTEM ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( dir - > change_dir ( path )  = =  OK )  { 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										String  cwd  =  dir - > get_current_dir ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-28 12:15:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										cwd  =  cwd . replace_char ( ' \\ ' ,  ' / ' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-30 16:03:12 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										// Ensure that we end with a '/'.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// This is important to ensure that we do not wrongly localize the resource path
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// in an absolute path that just happens to contain this string but points to a
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// different folder (e.g. "/my/project" as resource_path would be contained in
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// "/my/project_data", even though the latter is not part of res://.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-29 19:34:01 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										// `path_join("")` is an easy way to ensure we have a trailing '/'.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										const  String  res_path  =  resource_path . path_join ( " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-30 16:03:12 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-07-03 09:53:52 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										// DirAccess::get_current_dir() is not guaranteed to return a path that with a trailing '/',
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// so we must make sure we have it as well in order to compare with 'res_path'.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-29 19:34:01 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										cwd  =  cwd . path_join ( " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2019-07-03 09:53:52 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-30 16:03:12 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! cwd . begins_with ( res_path ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-11 16:07:35 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											return  path ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-19 15:46:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-30 16:03:12 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										return  cwd . replace_first ( res_path ,  " res:// " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-16 18:52:15 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										int  sep  =  path . rfind_char ( ' / ' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( sep  = =  - 1 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											return  " res:// "  +  path ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-19 15:46:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-01 23:12:30 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										String  parent  =  path . substr ( 0 ,  sep ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										String  plocal  =  localize_path ( parent ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-12-09 03:42:46 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( plocal . is_empty ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											return  " " ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-19 15:46:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2019-12-20 14:49:01 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										// Only strip the starting '/' from 'path' if its parent ('plocal') ends with '/'
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( plocal [ plocal . length ( )  -  1 ]  = =  ' / ' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											sep  + =  1 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2025-02-26 11:41:11 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										return  plocal  +  path . substr ( sep ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-19 15:46:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : set_initial_value ( const  String  & p_name ,  const  Variant  & p_value )  {  
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_MSG ( ! props . has ( p_name ) ,  vformat ( " Request for nonexistent project setting: '%s'. " ,  p_name ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-13 21:36:44 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// Duplicate so that if value is array or dictionary, changing the setting will not change the stored initial value.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									props [ p_name ] . initial  =  p_value . duplicate ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2020-05-14 14:29:06 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-07-19 18:58:15 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : set_restart_if_changed ( const  String  & p_name ,  bool  p_restart )  {  
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_MSG ( ! props . has ( p_name ) ,  vformat ( " Request for nonexistent project setting: '%s'. " ,  p_name ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2018-07-19 18:58:15 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									props [ p_name ] . restart_if_changed  =  p_restart ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-17 13:44:49 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : set_as_basic ( const  String  & p_name ,  bool  p_basic )  {  
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_MSG ( ! props . has ( p_name ) ,  vformat ( " Request for nonexistent project setting: '%s'. " ,  p_name ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-17 13:44:49 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									props [ p_name ] . basic  =  p_basic ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-06-06 15:22:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : set_as_internal ( const  String  & p_name ,  bool  p_internal )  {  
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_MSG ( ! props . has ( p_name ) ,  vformat ( " Request for nonexistent project setting: '%s'. " ,  p_name ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-06 15:22:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									props [ p_name ] . internal  =  p_internal ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-20 22:49:39 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : set_ignore_value_in_docs ( const  String  & p_name ,  bool  p_ignore )  {  
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_MSG ( ! props . has ( p_name ) ,  vformat ( " Request for nonexistent project setting: '%s'. " ,  p_name ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-20 22:49:39 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# ifdef DEBUG_METHODS_ENABLED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									props [ p_name ] . ignore_value_in_docs  =  p_ignore ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# endif 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								bool  ProjectSettings : : get_ignore_value_in_docs ( const  String  & p_name )  const  {  
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_V_MSG ( ! props . has ( p_name ) ,  false ,  vformat ( " Request for nonexistent project setting: '%s'. " ,  p_name ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-20 22:49:39 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# ifdef DEBUG_METHODS_ENABLED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  props [ p_name ] . ignore_value_in_docs ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# else 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# endif 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-06-08 17:52:19 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : add_hidden_prefix ( const  String  & p_prefix )  {  
						 
					
						
							
								
									
										
										
										
											2024-05-06 16:43:04 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_MSG ( hidden_prefixes . has ( p_prefix ) ,  vformat ( " Hidden prefix '%s' already exists. " ,  p_prefix ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-08 17:52:19 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									hidden_prefixes . push_back ( p_prefix ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								String  ProjectSettings : : globalize_path ( const  String  & p_path )  const  {  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( p_path . begins_with ( " res:// " ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-12-09 03:42:46 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! resource_path . is_empty ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											return  p_path . replace ( " res:/ " ,  resource_path ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-19 15:46:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										return  p_path . replace ( " res:// " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-15 16:14:38 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									}  else  if  ( p_path . begins_with ( " uid:// " ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										const  String  path  =  ResourceUID : : uid_to_path ( p_path ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! resource_path . is_empty ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											return  path . replace ( " res:/ " ,  resource_path ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										return  path . replace ( " res:// " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-10 16:33:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									}  else  if  ( p_path . begins_with ( " user:// " ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-17 15:25:22 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										String  data_dir  =  OS : : get_singleton ( ) - > get_user_data_dir ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-12-09 03:42:46 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! data_dir . is_empty ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-10 16:33:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											return  p_path . replace ( " user:/ " ,  data_dir ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-19 15:46:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-10 16:33:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										return  p_path . replace ( " user:// " ,  " " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  p_path ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								bool  ProjectSettings : : _set ( const  StringName  & p_name ,  const  Variant  & p_value )  {  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									_THREAD_SAFE_METHOD_ 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-09 00:00:52 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( p_value . get_type ( )  = =  Variant : : NIL )  { 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										props . erase ( p_name ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-17 20:45:08 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( p_name . operator  String ( ) . begins_with ( " autoload/ " ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											String  node_name  =  p_name . operator  String ( ) . split ( " / " ) [ 1 ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											if  ( autoloads . has ( node_name ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												remove_autoload ( node_name ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-12 15:20:12 +07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										}  else  if  ( p_name . operator  String ( ) . begins_with ( " global_group/ " ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-16 17:16:07 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											String  group_name  =  p_name . operator  String ( ) . get_slicec ( ' / ' ,  1 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-12 15:20:12 +07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											if  ( global_groups . has ( group_name ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												remove_global_group ( group_name ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-17 20:45:08 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-09-04 17:01:33 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( p_name  = =  CoreStringName ( _custom_features ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-27 12:37:55 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Vector < String >  custom_feature_array  =  String ( p_value ) . split ( " , " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											for  ( int  i  =  0 ;  i  <  custom_feature_array . size ( ) ;  i + + )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												custom_features . insert ( custom_feature_array [ i ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-14 18:33:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											_queue_changed ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											return  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-13 13:16:49 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										{  // Feature overrides.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-16 18:52:15 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											int  dot  =  p_name . operator  String ( ) . find_char ( ' . ' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											if  ( dot  ! =  - 1 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												Vector < String >  s  =  p_name . operator  String ( ) . split ( " . " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												for  ( int  i  =  1 ;  i  <  s . size ( ) ;  i + + )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
													String  feature  =  s [ i ] . strip_edges ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-01 10:49:05 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
													Pair < StringName ,  StringName >  feature_override ( feature ,  p_name ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-13 13:16:49 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
													if  ( ! feature_overrides . has ( s [ 0 ] ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
														feature_overrides [ s [ 0 ] ]  =  LocalVector < Pair < StringName ,  StringName > > ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-02-01 10:49:05 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
													feature_overrides [ s [ 0 ] ] . push_back ( feature_override ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( props . has ( p_name ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-13 13:16:49 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											props [ p_name ] . variant  =  p_value ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-17 21:05:38 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											props [ p_name ]  =  VariantContainer ( p_value ,  last_order + + ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-17 20:45:08 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( p_name . operator  String ( ) . begins_with ( " autoload/ " ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											String  node_name  =  p_name . operator  String ( ) . split ( " / " ) [ 1 ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											AutoloadInfo  autoload ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											autoload . name  =  node_name ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											String  path  =  p_value ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											if  ( path . begins_with ( " * " ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												autoload . is_singleton  =  true ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-09 16:16:45 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												autoload . path  =  path . substr ( 1 ) . simplify_path ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-17 20:45:08 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-09 16:16:45 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												autoload . path  =  path . simplify_path ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-17 20:45:08 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											add_autoload ( autoload ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-12 15:20:12 +07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										}  else  if  ( p_name . operator  String ( ) . begins_with ( " global_group/ " ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-16 17:16:07 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											String  group_name  =  p_name . operator  String ( ) . get_slicec ( ' / ' ,  1 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-12 15:20:12 +07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											add_global_group ( group_name ,  p_value ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-17 20:45:08 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-06-14 18:33:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									_queue_changed ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2020-05-14 14:29:06 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								bool  ProjectSettings : : _get ( const  StringName  & p_name ,  Variant  & r_ret )  const  {  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									_THREAD_SAFE_METHOD_ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-13 13:16:49 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( ! props . has ( p_name ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										return  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									r_ret  =  props [ p_name ] . variant ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-17 09:52:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								Variant  ProjectSettings : : get_setting_with_override_and_custom_features ( const  StringName  & p_name ,  const  Vector < String >  & p_features )  const  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									_THREAD_SAFE_METHOD_ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									StringName  name  =  p_name ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( feature_overrides . has ( name ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										const  LocalVector < Pair < StringName ,  StringName > >  & overrides  =  feature_overrides [ name ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										for  ( uint32_t  i  =  0 ;  i  <  overrides . size ( ) ;  i + + )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											if  ( p_features . has ( String ( overrides [ i ] . first ) . to_lower ( ) ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												if  ( props . has ( overrides [ i ] . second ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
													name  =  overrides [ i ] . second ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
													break ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( ! props . has ( name ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										WARN_PRINT ( " Property not found:  "  +  String ( name ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										return  Variant ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  props [ name ] . variant ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-13 13:16:49 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								Variant  ProjectSettings : : get_setting_with_override ( const  StringName  & p_name )  const  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									_THREAD_SAFE_METHOD_ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-01-28 12:42:49 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									const  LocalVector < Pair < StringName ,  StringName > >  * overrides  =  feature_overrides . getptr ( p_name ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( overrides )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										for  ( uint32_t  i  =  0 ;  i  <  overrides - > size ( ) ;  i + + )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											if  ( ! OS : : get_singleton ( ) - > has_feature ( ( * overrides ) [ i ] . first ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												continue ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											// Custom features are checked in OS.has_feature() already. No need to check twice.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											const  RBMap < StringName ,  VariantContainer > : : Element  * override_prop  =  props . find ( ( * overrides ) [ i ] . second ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											if  ( override_prop )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												return  override_prop - > get ( ) . variant ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-13 13:16:49 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-13 13:16:49 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-01-28 12:42:49 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									const  RBMap < StringName ,  VariantContainer > : : Element  * prop  =  props . find ( p_name ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( ! prop )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										WARN_PRINT ( vformat ( " Property not found: '%s'. " ,  p_name ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-13 13:16:49 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										return  Variant ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-01-14 21:56:22 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2025-01-28 12:42:49 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  prop - > get ( ) . variant ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								struct  _VCSort  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									String  name ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-02 16:28:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									Variant : : Type  type  =  Variant : : VARIANT_MAX ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									int  order  =  0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									uint32_t  flags  =  0 ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									bool  operator < ( const  _VCSort  & p_vcs )  const  {  return  order  = =  p_vcs . order  ?  name  <  p_vcs . name  :  order  <  p_vcs . order ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								} ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : _get_property_list ( List < PropertyInfo >  * p_list )  const  {  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									_THREAD_SAFE_METHOD_ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-13 15:04:37 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									RBSet < _VCSort >  vclist ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-09 00:00:52 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-08-09 14:13:42 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									for  ( const  KeyValue < StringName ,  VariantContainer >  & E  :  props )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										const  VariantContainer  * v  =  & E . value ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( v - > hide_from_editor )  { 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											continue ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										_VCSort  vc ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-09 14:13:42 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										vc . name  =  E . key ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										vc . order  =  v - > order ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										vc . type  =  v - > variant . get_type ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-08 17:52:19 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										bool  internal  =  v - > internal ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! internal )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											for  ( const  String  & F  :  hidden_prefixes )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												if  ( vc . name . begins_with ( F ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
													internal  =  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
													break ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( internal )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											vc . flags  =  PROPERTY_USAGE_STORAGE ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											vc . flags  =  PROPERTY_USAGE_EDITOR  |  PROPERTY_USAGE_STORAGE ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-03-02 16:54:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( v - > internal )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											vc . flags  | =  PROPERTY_USAGE_INTERNAL ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-17 13:44:49 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( v - > basic )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											vc . flags  | =  PROPERTY_USAGE_EDITOR_BASIC_SETTING ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-07-19 18:58:15 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( v - > restart_if_changed )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											vc . flags  | =  PROPERTY_USAGE_RESTART_IF_CHANGED ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										vclist . insert ( vc ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-18 17:43:40 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									for  ( const  _VCSort  & E  :  vclist )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										String  prop_info_name  =  E . name ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-16 18:52:15 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										int  dot  =  prop_info_name . find_char ( ' . ' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-17 13:44:49 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( dot  ! =  - 1  & &  ! custom_prop_info . has ( prop_info_name ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											prop_info_name  =  prop_info_name . substr ( 0 ,  dot ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( custom_prop_info . has ( prop_info_name ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											PropertyInfo  pi  =  custom_prop_info [ prop_info_name ] ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-18 17:43:40 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											pi . name  =  E . name ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											pi . usage  =  E . flags ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											p_list - > push_back ( pi ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-18 17:43:40 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											p_list - > push_back ( PropertyInfo ( E . type ,  E . name ,  PROPERTY_HINT_NONE ,  " " ,  E . flags ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-06-14 18:33:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : _queue_changed ( )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( is_changed  | |  ! MessageQueue : : get_singleton ( )  | |  MessageQueue : : get_singleton ( ) - > get_max_buffer_usage ( )  = =  0 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										return ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									is_changed  =  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									callable_mp ( this ,  & ProjectSettings : : _emit_changed ) . call_deferred ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : _emit_changed ( )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( ! is_changed )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										return ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									is_changed  =  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									emit_signal ( " settings_changed " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-04-09 10:31:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								bool  ProjectSettings : : load_resource_pack ( const  String  & p_pack ,  bool  p_replace_files ,  int  p_offset )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  ProjectSettings : : _load_resource_pack ( p_pack ,  p_replace_files ,  p_offset ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								bool  ProjectSettings : : _load_resource_pack ( const  String  & p_pack ,  bool  p_replace_files ,  int  p_offset ,  bool  p_main_pack )  {  
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( PackedData : : get_singleton ( ) - > is_disabled ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										return  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-04-09 10:31:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( p_pack  = =  " res:// " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// Loading the resource directory as a pack source is reserved for internal use only.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										return  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-04-09 10:31:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( ! p_main_pack  & &  ! using_datapack  & &  ! OS : : get_singleton ( ) - > get_resource_dir ( ) . is_empty ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// Add the project's resource file system to PackedData so directory access keeps working when
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// the game is running without a main pack, like in the editor or on Android.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										PackedData : : get_singleton ( ) - > add_pack_source ( memnew ( PackedSourceDirectory ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										PackedData : : get_singleton ( ) - > add_pack ( " res:// " ,  false ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										DirAccess : : make_default < DirAccessPack > ( DirAccess : : ACCESS_RESOURCES ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										using_datapack  =  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									bool  ok  =  PackedData : : get_singleton ( ) - > add_pack ( p_pack ,  p_replace_files ,  p_offset )  = =  OK ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( ! ok )  { 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										return  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-03-06 12:14:21 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( project_loaded )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// This pack may have declared new global classes (make sure they are picked up).
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										refresh_global_class_list ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// This pack may have defined new UIDs, make sure they are cached.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										ResourceUID : : get_singleton ( ) - > load_from_cache ( false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-04-09 10:31:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									// If the data pack was found, all directory access will be from here.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( ! using_datapack )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										DirAccess : : make_default < DirAccessPack > ( DirAccess : : ACCESS_RESOURCES ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										using_datapack  =  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-12-21 12:20:48 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : _convert_to_last_version ( int  p_from_version )  {  
						 
					
						
							
								
									
										
										
										
											2024-10-01 20:56:06 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# ifndef DISABLE_DEPRECATED 
  
						 
					
						
							
								
									
										
										
										
											2018-12-21 12:20:48 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( p_from_version  < =  3 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-21 22:06:34 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										// Converts the actions from array to dictionary (array of events to dictionary with deadzone + events)
 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-09 14:13:42 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										for  ( KeyValue < StringName ,  ProjectSettings : : VariantContainer >  & E  :  props )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											Variant  value  =  E . value . variant ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											if  ( String ( E . key ) . begins_with ( " input/ " )  & &  value . get_type ( )  = =  Variant : : ARRAY )  { 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-21 22:06:34 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												Array  array  =  value ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												Dictionary  action ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												action [ " deadzone " ]  =  Variant ( 0.5f ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												action [ " events " ]  =  array ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-09 14:13:42 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												E . value . variant  =  action ; 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-21 22:06:34 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-01 20:56:06 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# endif  // DISABLE_DEPRECATED
  
						 
					
						
							
								
									
										
										
										
											2018-02-21 22:06:34 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-24 20:04:36 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								/*
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *  This  method  is  responsible  for  loading  a  project . godot  file  and / or  data  file 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *  using  the  following  merit  order : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *   -  If  using  NetworkClient ,  try  to  lookup  project  file  or  fail . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *   -  If  - - main - pack  was  passed  by  the  user  ( ` p_main_pack ` ) ,  load  it  or  fail . 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 17:50:16 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								 *   -  Search  for  project  PCKs  automatically .  For  each  step  we  try  loading  a  potential 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *     PCK ,  and  if  it  doesn ' t  work ,  we  proceed  to  the  next  step .  If  any  step  succeeds , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *     we  try  loading  the  project  settings ,  and  abort  if  it  fails .  Steps : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *     o  Bundled  PCK  in  the  executable . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *     o  [ macOS  only ]  PCK  with  same  basename  as  the  binary  in  the  . app  resource  dir . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *     o  PCK  with  same  basename  as  the  binary  in  the  binary ' s  directory .  We  handle  both 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *       changing  the  extension  to  ' . pck '  ( e . g .  ' win_game . exe '  - >  ' win_game . pck ' )  and 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *       appending  ' . pck '  to  the  binary  name  ( e . g .  ' linux_game '  - >  ' linux_game . pck ' ) . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *     o  PCK  with  the  same  basename  as  the  binary  in  the  current  working  directory . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *       Same  as  above  for  the  two  possible  PCK  file  names . 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-24 20:04:36 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								 *   -  On  relevant  platforms  ( Android / iOS ) ,  lookup  project  file  in  OS  resource  path . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *     If  found ,  load  it  or  fail . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *   -  Lookup  project  file  in  passed  ` p_path `  ( - - path  passed  by  the  user ) ,  i . e .  we 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *     are  running  from  source  code . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *     If  not  found  and  ` p_upwards `  is  true  ( - - upwards  passed  by  the  user ) ,  look  for 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *     project  files  in  parent  folders  up  to  the  system  root  ( used  to  run  a  game 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *     from  command  line  while  in  a  subfolder ) . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *     If  a  project  file  is  found ,  load  it  or  fail . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 *     If  nothing  was  found ,  error  out . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								 */ 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-22 16:10:31 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								Error  ProjectSettings : : _setup ( const  String  & p_path ,  const  String  & p_main_pack ,  bool  p_upwards ,  bool  p_ignore_override )  {  
						 
					
						
							
								
									
										
										
										
											2022-08-26 15:01:22 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( ! OS : : get_singleton ( ) - > get_resource_dir ( ) . is_empty ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// OS will call ProjectSettings->get_resource_path which will be empty if not overridden!
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// If the OS would rather use a specific location, then it will not be empty.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-28 12:15:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										resource_path  =  OS : : get_singleton ( ) - > get_resource_dir ( ) . replace_char ( ' \\ ' ,  ' / ' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-26 15:01:22 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! resource_path . is_empty ( )  & &  resource_path [ resource_path . length ( )  -  1 ]  = =  ' / ' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											resource_path  =  resource_path . substr ( 0 ,  resource_path . length ( )  -  1 ) ;  // Chop end.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-24 20:04:36 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									// Attempt with a user-defined main pack first
 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-12-09 03:42:46 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( ! p_main_pack . is_empty ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-09 10:31:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										bool  ok  =  _load_resource_pack ( p_main_pack ,  false ,  0 ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										ERR_FAIL_COND_V_MSG ( ! ok ,  ERR_CANT_OPEN ,  vformat ( " Cannot open resource pack '%s'. " ,  p_main_pack ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-29 17:56:51 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 14:53:59 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										Error  err  =  _load_settings_text_or_binary ( " res://project.godot " ,  " res://project.binary " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-22 16:10:31 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( err  = =  OK  & &  ! p_ignore_override )  { 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 14:53:59 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											// Load override from location of the main pack
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											// Optional, we don't mind if it fails
 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-29 19:34:01 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											_load_settings_text ( p_main_pack . get_base_dir ( ) . path_join ( " override.cfg " ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-06-27 23:21:45 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 14:53:59 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										return  err ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-06-27 23:21:45 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-24 20:04:36 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									String  exec_path  =  OS : : get_singleton ( ) - > get_executable_path ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-12-09 03:42:46 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( ! exec_path . is_empty ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 17:50:16 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										// We do several tests sequentially until one succeeds to find a PCK,
 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-12 19:05:16 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										// and if so, we attempt loading it at the end.
 
							 
						 
					
						
							
								
									
										
										
										
											2019-03-25 20:56:33 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 17:50:16 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										// Attempt with PCK bundled into executable.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-09 10:31:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										bool  found  =  _load_resource_pack ( exec_path ,  false ,  0 ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2019-03-25 20:56:33 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 17:50:16 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										// Attempt with exec_name.pck.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// (This is the usual case when distributing a Godot game.)
 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-24 20:04:36 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										String  exec_dir  =  exec_path . get_base_dir ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										String  exec_filename  =  exec_path . get_file ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										String  exec_basename  =  exec_filename . get_basename ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 17:50:16 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										// Based on the OS, it can be the exec path + '.pck' (Linux w/o extension, macOS in .app bundle)
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// or the exec path's basename + '.pck' (Windows).
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// We need to test both possibilities as extensions for Linux binaries are optional
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// (so both 'mygame.bin' and 'mygame' should be able to find 'mygame.pck').
 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-07-20 09:28:22 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# ifdef MACOS_ENABLED 
  
						 
					
						
							
								
									
										
										
										
											2020-01-10 18:02:29 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! found )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 17:50:16 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											// Attempt to load PCK from macOS .app bundle resources.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-09 10:31:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											found  =  _load_resource_pack ( OS : : get_singleton ( ) - > get_bundle_resource_dir ( ) . path_join ( exec_basename  +  " .pck " ) ,  false ,  0 ,  true )  | |  _load_resource_pack ( OS : : get_singleton ( ) - > get_bundle_resource_dir ( ) . path_join ( exec_filename  +  " .pck " ) ,  false ,  0 ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-10 18:02:29 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# endif 
  
						 
					
						
							
								
									
										
										
										
											2019-03-25 20:56:33 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! found )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 17:50:16 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											// Try to load data pack at the location of the executable.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											// As mentioned above, we have two potential names to attempt.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-09 10:31:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											found  =  _load_resource_pack ( exec_dir . path_join ( exec_basename  +  " .pck " ) ,  false ,  0 ,  true )  | |  _load_resource_pack ( exec_dir . path_join ( exec_filename  +  " .pck " ) ,  false ,  0 ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 17:50:16 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-16 18:41:59 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 17:50:16 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! found )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											// If we couldn't find them next to the executable, we attempt
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											// the current working directory. Same story, two tests.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-09 10:31:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											found  =  _load_resource_pack ( exec_basename  +  " .pck " ,  false ,  0 ,  true )  | |  _load_resource_pack ( exec_filename  +  " .pck " ,  false ,  0 ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2019-03-25 20:56:33 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 17:50:16 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										// If we opened our package, try and load our project.
 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-08 11:39:32 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( found )  { 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 14:53:59 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Error  err  =  _load_settings_text_or_binary ( " res://project.godot " ,  " res://project.binary " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-22 16:10:31 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											if  ( err  = =  OK  & &  ! p_ignore_override )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-11 16:58:27 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												// Load overrides from the PCK and the executable location.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												// Optional, we don't mind if either fails.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												_load_settings_text ( " res://override.cfg " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-29 19:34:01 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												_load_settings_text ( exec_path . get_base_dir ( ) . path_join ( " override.cfg " ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 14:53:59 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											return  err ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-09 00:00:52 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 17:50:16 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									// Try to use the filesystem for files, according to OS.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// (Only Android -when reading from pck- and iOS use this.)
 
							 
						 
					
						
							
								
									
										
										
										
											2017-02-21 00:05:15 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-12-09 03:42:46 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( ! OS : : get_singleton ( ) - > get_resource_dir ( ) . is_empty ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 14:53:59 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										Error  err  =  _load_settings_text_or_binary ( " res://project.godot " ,  " res://project.binary " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-22 16:10:31 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( err  = =  OK  & &  ! p_ignore_override )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 17:50:16 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											// Optional, we don't mind if it fails.
 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 14:53:59 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											_load_settings_text ( " res://override.cfg " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 14:53:59 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										return  err ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-01-04 04:08:44 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# ifdef MACOS_ENABLED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// Attempt to load project file from macOS .app bundle resources.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									resource_path  =  OS : : get_singleton ( ) - > get_bundle_resource_dir ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( ! resource_path . is_empty ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( resource_path [ resource_path . length ( )  -  1 ]  = =  ' / ' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											resource_path  =  resource_path . substr ( 0 ,  resource_path . length ( )  -  1 ) ;  // Chop end.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										Ref < DirAccess >  d  =  DirAccess : : create ( DirAccess : : ACCESS_FILESYSTEM ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										ERR_FAIL_COND_V_MSG ( d . is_null ( ) ,  ERR_CANT_CREATE ,  vformat ( " Cannot create DirAccess for path '%s'. " ,  resource_path ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										d - > change_dir ( resource_path ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										Error  err ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										err  =  _load_settings_text_or_binary ( resource_path . path_join ( " project.godot " ) ,  resource_path . path_join ( " project.binary " ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( err  = =  OK  & &  ! p_ignore_override )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											// Optional, we don't mind if it fails.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											_load_settings_text ( resource_path . path_join ( " override.cfg " ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											return  err ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# endif 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-24 20:04:36 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									// Nothing was found, try to find a project file in provided path (`p_path`)
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// or, if requested (`p_upwards`) in parent directories.
 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-03-23 11:08:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									Ref < DirAccess >  d  =  DirAccess : : create ( DirAccess : : ACCESS_FILESYSTEM ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_V_MSG ( d . is_null ( ) ,  ERR_CANT_CREATE ,  vformat ( " Cannot create DirAccess for path '%s'. " ,  p_path ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-02-21 00:05:15 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									d - > change_dir ( p_path ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-11-15 01:13:14 +03:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-02-21 00:05:15 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									String  current_dir  =  d - > get_current_dir ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									bool  found  =  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 14:53:59 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									Error  err ; 
							 
						 
					
						
							
								
									
										
										
										
											2015-11-15 01:13:14 +03:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									while  ( true )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-04-07 14:32:26 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										// Set the resource path early so things can be resolved when loading.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										resource_path  =  current_dir ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-28 12:15:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										resource_path  =  resource_path . replace_char ( ' \\ ' ,  ' / ' ) ;  // Windows path to Unix path just in case.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-29 19:34:01 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										err  =  _load_settings_text_or_binary ( current_dir . path_join ( " project.godot " ) ,  current_dir . path_join ( " project.binary " ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-22 16:10:31 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( err  = =  OK  & &  ! p_ignore_override )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 17:50:16 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											// Optional, we don't mind if it fails.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-29 19:34:01 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											_load_settings_text ( current_dir . path_join ( " override.cfg " ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											found  =  true ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-02-21 00:05:15 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											break ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-10-10 23:45:54 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( p_upwards )  { 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-24 20:04:36 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											// Try to load settings ascending through parent directories
 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-10 23:45:54 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											d - > change_dir ( " .. " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											if  ( d - > get_current_dir ( )  = =  current_dir )  { 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-24 20:04:36 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												break ;  // not doing anything useful
 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-10 23:45:54 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											current_dir  =  d - > get_current_dir ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										}  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											break ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2017-02-21 00:05:15 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( ! found )  { 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 14:53:59 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										return  err ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( resource_path . length ( )  & &  resource_path [ resource_path . length ( )  -  1 ]  = =  ' / ' )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-25 17:50:16 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										resource_path  =  resource_path . substr ( 0 ,  resource_path . length ( )  -  1 ) ;  // Chop end.
 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  OK ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-11-22 16:10:31 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								Error  ProjectSettings : : setup ( const  String  & p_path ,  const  String  & p_main_pack ,  bool  p_upwards ,  bool  p_ignore_override )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									Error  err  =  _setup ( p_path ,  p_main_pack ,  p_upwards ,  p_ignore_override ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-25 01:30:37 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( err  = =  OK  & &  ! p_ignore_override )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-20 15:43:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										String  custom_settings  =  GLOBAL_GET ( " application/config/project_settings_override " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-12-09 03:42:46 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! custom_settings . is_empty ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2018-11-18 10:56:21 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											_load_settings_text ( custom_settings ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-10 08:32:29 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// Updating the default value after the project settings have loaded.
 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-13 13:56:18 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									bool  use_hidden_directory  =  GLOBAL_GET ( " application/config/use_hidden_project_data_directory " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									project_data_dir_name  =  ( use_hidden_directory  ?  " . "  :  " " )  +  PROJECT_DATA_DIR_NAME_SUFFIX ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-10 08:32:29 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-07-13 14:38:35 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									// Using GLOBAL_GET on every block for compressing can be slow, so assigning here.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									Compression : : zstd_long_distance_matching  =  GLOBAL_GET ( " compression/formats/zstd/long_distance_matching " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									Compression : : zstd_level  =  GLOBAL_GET ( " compression/formats/zstd/compression_level " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									Compression : : zstd_window_log_size  =  GLOBAL_GET ( " compression/formats/zstd/window_log_size " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									Compression : : zlib_level  =  GLOBAL_GET ( " compression/formats/zlib/compression_level " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									Compression : : gzip_level  =  GLOBAL_GET ( " compression/formats/gzip/compression_level " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2018-11-18 10:56:21 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-12 15:20:12 +07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									load_scene_groups_cache ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-02-19 21:05:16 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									project_loaded  =  err  = =  OK ; 
							 
						 
					
						
							
								
									
										
										
										
											2018-11-18 10:56:21 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									return  err ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-08 22:36:19 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								bool  ProjectSettings : : has_setting ( const  String  & p_var )  const  {  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									_THREAD_SAFE_METHOD_ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-03-07 12:33:07 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									return  props . has ( p_var ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-07-10 11:54:12 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								Error  ProjectSettings : : _load_settings_binary ( const  String  & p_path )  {  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									Error  err ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-23 11:08:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									Ref < FileAccess >  f  =  FileAccess : : open ( p_path ,  FileAccess : : READ ,  & err ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( err  ! =  OK )  { 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										return  err ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									uint8_t  hdr [ 4 ] ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									f - > get_buffer ( hdr ,  4 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-23 11:08:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_V_MSG ( ( hdr [ 0 ]  ! =  ' E '  | |  hdr [ 1 ]  ! =  ' C '  | |  hdr [ 2 ]  ! =  ' F '  | |  hdr [ 3 ]  ! =  ' G ' ) ,  ERR_FILE_CORRUPT ,  " Corrupted header in binary project.binary (not ECFG). " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									uint32_t  count  =  f - > get_32 ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									for  ( uint32_t  i  =  0 ;  i  <  count ;  i + + )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										uint32_t  slen  =  f - > get_32 ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										CharString  cs ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										cs . resize ( slen  +  1 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										cs [ slen ]  =  0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										f - > get_buffer ( ( uint8_t  * ) cs . ptr ( ) ,  slen ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-30 19:56:38 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										String  key  =  String : : utf8 ( cs . ptr ( ) ,  slen ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										uint32_t  vlen  =  f - > get_32 ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										Vector < uint8_t >  d ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										d . resize ( vlen ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-25 00:07:54 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										f - > get_buffer ( d . ptrw ( ) ,  vlen ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										Variant  value ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-02 01:20:12 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										err  =  decode_variant ( value ,  d . ptr ( ) ,  d . size ( ) ,  nullptr ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										ERR_CONTINUE_MSG ( err  ! =  OK ,  vformat ( " Error decoding property: '%s'. " ,  key ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										set ( key ,  value ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  OK ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2018-02-19 14:53:59 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-07-10 11:54:12 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								Error  ProjectSettings : : _load_settings_text ( const  String  & p_path )  {  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									Error  err ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-23 11:08:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									Ref < FileAccess >  f  =  FileAccess : : open ( p_path ,  FileAccess : : READ ,  & err ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-03-23 11:08:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( f . is_null ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-21 09:07:47 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										// FIXME: Above 'err' error code is ERR_FILE_CANT_OPEN if the file is missing
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// This needs to be streamlined if we want decent error reporting
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										return  ERR_FILE_NOT_FOUND ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-01-11 16:15:40 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									VariantParser : : StreamFile  stream ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									stream . f  =  f ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-01-11 16:15:40 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									String  assign ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									Variant  value ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									VariantParser : : Tag  next_tag ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									int  lines  =  0 ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-01-11 16:15:40 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									String  error_text ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									String  section ; 
							 
						 
					
						
							
								
									
										
										
										
											2018-12-21 12:20:48 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									int  config_version  =  0 ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									while  ( true )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										assign  =  Variant ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-01-11 16:15:40 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										next_tag . fields . clear ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										next_tag . name  =  String ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-04-02 01:20:12 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										err  =  VariantParser : : parse_tag_assign_eof ( & stream ,  lines ,  error_text ,  next_tag ,  assign ,  value ,  nullptr ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( err  = =  ERR_FILE_EOF )  { 
							 
						 
					
						
							
								
									
										
										
										
											2018-12-21 12:20:48 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											// If we're loading a project.godot from source code, we can operate some
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											// ProjectSettings conversions if need be.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											_convert_to_last_version ( config_version ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-29 19:34:01 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											last_save_time  =  FileAccess : : get_modified_time ( get_resource_path ( ) . path_join ( " project.godot " ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-01-11 16:15:40 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											return  OK ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										ERR_FAIL_COND_V_MSG ( err  ! =  OK ,  err ,  vformat ( " Error parsing '%s' at line %d: %s File might be corrupted. " ,  p_path ,  lines ,  error_text ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-12-09 03:42:46 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! assign . is_empty ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											if  ( section . is_empty ( )  & &  assign  = =  " config_version " )  { 
							 
						 
					
						
							
								
									
										
										
										
											2018-12-21 12:20:48 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												config_version  =  value ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-23 11:08:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												ERR_FAIL_COND_V_MSG ( config_version  >  CONFIG_VERSION ,  ERR_FILE_CANT_OPEN ,  vformat ( " Can't open project at '%s', its `config_version` (%d) is from a more recent and incompatible version of the engine. Expected config version: %d. " ,  p_path ,  config_version ,  CONFIG_VERSION ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-26 15:28:54 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-12-09 03:42:46 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												if  ( section . is_empty ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2018-07-15 19:29:00 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
													set ( assign ,  value ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												}  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
													set ( section  +  " / "  +  assign ,  value ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2017-02-04 21:02:52 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2021-12-09 03:42:46 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										}  else  if  ( ! next_tag . name . is_empty ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											section  =  next_tag . name ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-01-11 16:15:40 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-07-10 11:54:12 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								Error  ProjectSettings : : _load_settings_text_or_binary ( const  String  & p_text_path ,  const  String  & p_bin_path )  {  
						 
					
						
							
								
									
										
										
										
											2020-10-22 00:12:18 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									// Attempt first to load the binary project.godot file.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									Error  err  =  _load_settings_binary ( p_bin_path ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( err  = =  OK )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										return  OK ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									}  else  if  ( err  ! =  ERR_FILE_NOT_FOUND )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// If the file exists but can't be loaded, we want to know it.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										ERR_PRINT ( vformat ( " Couldn't load file '%s', error code %d. " ,  p_bin_path ,  err ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-22 00:12:18 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// Fallback to text-based project.godot file if binary was not found.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									err  =  _load_settings_text ( p_text_path ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( err  = =  OK )  { 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 14:53:59 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										return  OK ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-22 00:12:18 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									}  else  if  ( err  ! =  ERR_FILE_NOT_FOUND )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										ERR_PRINT ( vformat ( " Couldn't load file '%s', error code %d. " ,  p_text_path ,  err ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 14:53:59 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-10-22 00:12:18 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									return  err ; 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-19 14:53:59 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-11-24 10:12:56 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								Error  ProjectSettings : : load_custom ( const  String  & p_path )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( p_path . ends_with ( " .binary " ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										return  _load_settings_binary ( p_path ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  _load_settings_text ( p_path ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								int  ProjectSettings : : get_order ( const  String  & p_name )  const  {  
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_V_MSG ( ! props . has ( p_name ) ,  - 1 ,  vformat ( " Request for nonexistent project setting: '%s'. " ,  p_name ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  props [ p_name ] . order ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : set_order ( const  String  & p_name ,  int  p_order )  {  
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_MSG ( ! props . has ( p_name ) ,  vformat ( " Request for nonexistent project setting: '%s'. " ,  p_name ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									props [ p_name ] . order  =  p_order ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : set_builtin_order ( const  String  & p_name )  {  
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_MSG ( ! props . has ( p_name ) ,  vformat ( " Request for nonexistent project setting: '%s'. " ,  p_name ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-17 21:05:38 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( props [ p_name ] . order  > =  NO_BUILTIN_ORDER_BASE )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										props [ p_name ] . order  =  last_builtin_order + + ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-07-15 18:33:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								bool  ProjectSettings : : is_builtin_setting ( const  String  & p_name )  const  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// Return true because a false negative is worse than a false positive.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_V_MSG ( ! props . has ( p_name ) ,  true ,  vformat ( " Request for nonexistent project setting: '%s'. " ,  p_name ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-15 18:33:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									return  props [ p_name ] . order  <  NO_BUILTIN_ORDER_BASE ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : clear ( const  String  & p_name )  {  
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_MSG ( ! props . has ( p_name ) ,  vformat ( " Request for nonexistent project setting: '%s'. " ,  p_name ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									props . erase ( p_name ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								Error  ProjectSettings : : save ( )  {  
						 
					
						
							
								
									
										
										
										
											2022-08-29 19:34:01 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									Error  error  =  save_custom ( get_resource_path ( ) . path_join ( " project.godot " ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-17 01:09:17 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( error  = =  OK )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-29 19:34:01 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										last_save_time  =  FileAccess : : get_modified_time ( get_resource_path ( ) . path_join ( " project.godot " ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-17 01:09:17 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  error ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-09-29 12:53:28 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								Error  ProjectSettings : : _save_settings_binary ( const  String  & p_file ,  const  RBMap < String ,  List < String > >  & p_props ,  const  CustomMap  & p_custom ,  const  String  & p_custom_features )  {  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									Error  err ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-23 11:08:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									Ref < FileAccess >  file  =  FileAccess : : open ( p_file ,  FileAccess : : WRITE ,  & err ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_V_MSG ( err  ! =  OK ,  err ,  vformat ( " Couldn't save project.binary at '%s'. " ,  p_file ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									uint8_t  hdr [ 4 ]  =  {  ' E ' ,  ' C ' ,  ' F ' ,  ' G '  } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									file - > store_buffer ( hdr ,  4 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									int  count  =  0 ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-09-29 12:53:28 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									for  ( const  KeyValue < String ,  List < String > >  & E  :  p_props )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-09 14:13:42 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										count  + =  E . value . size ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-12-09 03:42:46 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( ! p_custom_features . is_empty ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-11 23:01:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										// Store how many properties are saved, add one for custom features, which must always go first.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-12-14 02:17:09 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										file - > store_32 ( uint32_t ( count  +  1 ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-09-04 17:01:33 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										String  key  =  CoreStringName ( _custom_features ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-16 16:32:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										file - > store_pascal_string ( key ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										int  len ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-02 01:20:12 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										err  =  encode_variant ( p_custom_features ,  nullptr ,  len ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-23 11:08:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										ERR_FAIL_COND_V ( err  ! =  OK ,  err ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										Vector < uint8_t >  buff ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										buff . resize ( len ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-03-26 16:52:42 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										err  =  encode_variant ( p_custom_features ,  buff . ptrw ( ) ,  len ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-23 11:08:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										ERR_FAIL_COND_V ( err  ! =  OK ,  err ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-12-14 02:17:09 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										file - > store_32 ( uint32_t ( len ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										file - > store_buffer ( buff . ptr ( ) ,  buff . size ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-11 23:01:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										// Store how many properties are saved.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-12-14 02:17:09 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										file - > store_32 ( uint32_t ( count ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-09-29 12:53:28 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									for  ( const  KeyValue < String ,  List < String > >  & E  :  p_props )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-13 15:04:37 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										for  ( const  String  & key  :  E . value )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											String  k  =  key ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											if  ( ! E . key . is_empty ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												k  =  E . key  +  " / "  +  k ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											Variant  value ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-13 15:04:37 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											if  ( p_custom . has ( k ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												value  =  p_custom [ k ] ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-13 15:04:37 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												value  =  get ( k ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-13 15:04:37 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											file - > store_pascal_string ( k ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											int  len ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-02 01:20:12 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											err  =  encode_variant ( value ,  nullptr ,  len ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-25 10:28:50 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											ERR_FAIL_COND_V_MSG ( err  ! =  OK ,  ERR_INVALID_DATA ,  " Error when trying to encode Variant. " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											Vector < uint8_t >  buff ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											buff . resize ( len ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-04-15 15:30:54 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											err  =  encode_variant ( value ,  buff . ptrw ( ) ,  len ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-25 10:28:50 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											ERR_FAIL_COND_V_MSG ( err  ! =  OK ,  ERR_INVALID_DATA ,  " Error when trying to encode Variant. " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-12-14 02:17:09 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											file - > store_32 ( uint32_t ( len ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											file - > store_buffer ( buff . ptr ( ) ,  buff . size ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  OK ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-09-29 12:53:28 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								Error  ProjectSettings : : _save_settings_text ( const  String  & p_file ,  const  RBMap < String ,  List < String > >  & p_props ,  const  CustomMap  & p_custom ,  const  String  & p_custom_features )  {  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									Error  err ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-23 11:08:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									Ref < FileAccess >  file  =  FileAccess : : open ( p_file ,  FileAccess : : WRITE ,  & err ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_V_MSG ( err  ! =  OK ,  err ,  vformat ( " Couldn't save project.godot - %s. " ,  p_file ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-26 15:28:54 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									file - > store_line ( " ; Engine configuration file. " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									file - > store_line ( " ; It's best edited using the editor UI and not directly, " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									file - > store_line ( " ; since the parameters that go here are not all obvious. " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-09 08:34:32 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									file - > store_line ( " ; " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									file - > store_line ( " ; Format: " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-26 15:28:54 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									file - > store_line ( " ;   [section] ; section goes between [] " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									file - > store_line ( " ;   param=value ; assign values to parameters " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									file - > store_line ( " " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-12-21 12:20:48 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									file - > store_string ( " config_version= "  +  itos ( CONFIG_VERSION )  +  " \n " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-12-09 03:42:46 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( ! p_custom_features . is_empty ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-25 21:02:38 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										file - > store_string ( " custom_features= \" "  +  p_custom_features  +  " \" \n " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-25 21:02:38 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									file - > store_string ( " \n " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-02-04 21:02:52 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-09-29 12:53:28 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									for  ( const  KeyValue < String ,  List < String > >  & E  :  p_props )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( E . key  ! =  p_props . begin ( ) - > key )  { 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											file - > store_string ( " \n " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-13 15:04:37 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! E . key . is_empty ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											file - > store_string ( " [ "  +  E . key  +  " ] \n \n " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-13 15:04:37 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										for  ( const  String  & F  :  E . value )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-15 23:45:57 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											String  key  =  F ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-13 15:04:37 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											if  ( ! E . key . is_empty ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												key  =  E . key  +  " / "  +  key ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											Variant  value ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											if  ( p_custom . has ( key ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												value  =  p_custom [ key ] ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												value  =  get ( key ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-01-11 16:15:40 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											String  vstr ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											VariantWriter : : write_to_string ( value ,  vstr ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-15 23:45:57 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											file - > store_string ( F . property_name_encode ( )  +  " = "  +  vstr  +  " \n " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  OK ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2015-06-30 11:28:43 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								Error  ProjectSettings : : _save_custom_bnd ( const  String  & p_file )  {  // add other params as dictionary and array?
  
						 
					
						
							
								
									
										
										
										
											2015-06-30 11:28:43 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									return  save_custom ( p_file ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-19 15:46:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2015-06-30 11:28:43 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-03-06 21:39:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# ifdef TOOLS_ENABLED 
  
						 
					
						
							
								
									
										
										
										
											2024-01-08 22:36:19 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								bool  _csproj_exists ( const  String  & p_root_dir )  {  
						 
					
						
							
								
									
										
										
										
											2023-03-06 21:39:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									Ref < DirAccess >  dir  =  DirAccess : : open ( p_root_dir ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-09-26 03:07:43 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_V ( dir . is_null ( ) ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-06 21:39:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									dir - > list_dir_begin ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									String  file_name  =  dir - > _get_next ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									while  ( file_name  ! =  " " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! dir - > current_is_dir ( )  & &  file_name . get_extension ( )  = =  " csproj " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											return  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										file_name  =  dir - > _get_next ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# endif  // TOOLS_ENABLED
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-26 15:28:54 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								Error  ProjectSettings : : save_custom ( const  String  & p_path ,  const  CustomMap  & p_custom ,  const  Vector < String >  & p_custom_features ,  bool  p_merge_with_current )  {  
						 
					
						
							
								
									
										
										
										
											2021-12-09 03:42:46 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_V_MSG ( p_path . is_empty ( ) ,  ERR_INVALID_PARAMETER ,  " Project settings save path cannot be empty. " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-08-09 14:36:02 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# ifdef TOOLS_ENABLED 
  
						 
					
						
							
								
									
										
										
										
											2022-06-06 15:22:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									PackedStringArray  project_features  =  get_setting ( " application/config/features " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-25 01:45:33 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									// If there is no feature list currently present, force one to generate.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( project_features . is_empty ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										project_features  =  ProjectSettings : : get_required_features ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// Check the rendering API.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-07 17:44:36 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									const  String  rendering_api  =  has_setting ( " rendering/renderer/rendering_method " )  ?  ( String ) get_setting ( " rendering/renderer/rendering_method " )  :  String ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-12-09 03:42:46 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( ! rendering_api . is_empty ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-25 01:45:33 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										// Add the rendering API as a project feature if it doesn't already exist.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! project_features . has ( rendering_api ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											project_features . append ( rendering_api ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// Check for the existence of a csproj file.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-17 15:05:20 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( _csproj_exists ( get_resource_path ( ) ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-25 01:45:33 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										// If there is a csproj file, add the C# feature if it doesn't already exist.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! project_features . has ( " C# " ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											project_features . append ( " C# " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									}  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// If there isn't a csproj file, remove the C# feature if it exists.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( project_features . has ( " C# " ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											project_features . remove_at ( project_features . find ( " C# " ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									project_features  =  _trim_to_supported_features ( project_features ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-25 08:23:42 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									set_setting ( " application/config/features " ,  project_features ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-09 14:36:02 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# endif  // TOOLS_ENABLED
  
						 
					
						
							
								
									
										
										
										
											2021-11-25 01:45:33 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-13 15:04:37 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									RBSet < _VCSort >  vclist ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-26 15:28:54 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( p_merge_with_current )  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-09 14:13:42 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										for  ( const  KeyValue < StringName ,  VariantContainer >  & G  :  props )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											const  VariantContainer  * v  =  & G . value ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											if  ( v - > hide_from_editor )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-26 15:28:54 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												continue ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-08-09 14:13:42 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											if  ( p_custom . has ( G . key ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-26 15:28:54 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												continue ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-26 15:28:54 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											_VCSort  vc ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-09 14:13:42 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											vc . name  =  G . key ;  //*k;
 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-26 15:28:54 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											vc . order  =  v - > order ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											vc . type  =  v - > variant . get_type ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											vc . flags  =  PROPERTY_USAGE_EDITOR  |  PROPERTY_USAGE_STORAGE ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											if  ( v - > variant  = =  v - > initial )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-26 15:28:54 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
												continue ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-26 15:28:54 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											vclist . insert ( vc ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-08-09 14:13:42 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									for  ( const  KeyValue < String ,  Variant >  & E  :  p_custom )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-26 15:28:54 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										// Lookup global prop to store in the same order
 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-17 10:53:59 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										RBMap < StringName ,  VariantContainer > : : Iterator  global_prop  =  props . find ( E . key ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-26 15:28:54 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										_VCSort  vc ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-09 14:13:42 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										vc . name  =  E . key ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-13 15:04:37 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										vc . order  =  global_prop  ?  global_prop - > value . order  :  0xFFFFFFF ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-09 14:13:42 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										vc . type  =  E . value . get_type ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										vc . flags  =  PROPERTY_USAGE_STORAGE ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										vclist . insert ( vc ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-09-29 12:53:28 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									RBMap < String ,  List < String > >  save_props ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-18 17:43:40 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									for  ( const  _VCSort  & E  :  vclist )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										String  category  =  E . name ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										String  name  =  E . name ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-11-16 18:52:15 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										int  div  =  category . find_char ( ' / ' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( div  <  0 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											category  =  " " ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											category  =  category . substr ( 0 ,  div ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-02-26 11:41:11 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											name  =  name . substr ( div  +  1 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-29 12:53:28 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										save_props [ category ] . push_back ( name ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-09-29 12:53:28 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									String  save_features ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									for  ( int  i  =  0 ;  i  <  p_custom_features . size ( ) ;  i + + )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( i  >  0 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-29 12:53:28 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											save_features  + =  " , " ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-05-28 12:55:07 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										String  f  =  p_custom_features [ i ] . strip_edges ( ) . remove_char ( ' \" ' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-29 12:53:28 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										save_features  + =  f ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-24 16:37:29 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( p_path . ends_with ( " .godot " )  | |  p_path . ends_with ( " override.cfg " ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-29 12:53:28 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										return  _save_settings_text ( p_path ,  save_props ,  p_custom ,  save_features ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									}  else  if  ( p_path . ends_with ( " .binary " ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-29 12:53:28 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										return  _save_settings_binary ( p_path ,  save_props ,  p_custom ,  save_features ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									}  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-11 16:17:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										ERR_FAIL_V_MSG ( ERR_FILE_UNRECOGNIZED ,  vformat ( " Unknown config file format: '%s'. " ,  p_path ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-06-06 15:22:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								Variant  _GLOBAL_DEF ( const  String  & p_var ,  const  Variant  & p_default ,  bool  p_restart_if_changed ,  bool  p_ignore_value_in_docs ,  bool  p_basic ,  bool  p_internal )  {  
						 
					
						
							
								
									
										
										
										
											2017-07-17 21:05:38 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									Variant  ret ; 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 21:05:40 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( ! ProjectSettings : : get_singleton ( ) - > has_setting ( p_var ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										ProjectSettings : : get_singleton ( ) - > set ( p_var ,  p_default ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-01-05 09:16:00 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-18 16:43:37 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ret  =  GLOBAL_GET ( p_var ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 21:05:40 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ProjectSettings : : get_singleton ( ) - > set_initial_value ( p_var ,  p_default ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									ProjectSettings : : get_singleton ( ) - > set_builtin_order ( p_var ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-17 13:44:49 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ProjectSettings : : get_singleton ( ) - > set_as_basic ( p_var ,  p_basic ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2018-07-19 18:58:15 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ProjectSettings : : get_singleton ( ) - > set_restart_if_changed ( p_var ,  p_restart_if_changed ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-20 22:49:39 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ProjectSettings : : get_singleton ( ) - > set_ignore_value_in_docs ( p_var ,  p_ignore_value_in_docs ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-06 15:22:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ProjectSettings : : get_singleton ( ) - > set_as_internal ( p_var ,  p_internal ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-17 21:05:38 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									return  ret ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-11-08 19:53:22 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								Variant  _GLOBAL_DEF ( const  PropertyInfo  & p_info ,  const  Variant  & p_default ,  bool  p_restart_if_changed ,  bool  p_ignore_value_in_docs ,  bool  p_basic ,  bool  p_internal )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									Variant  ret  =  _GLOBAL_DEF ( p_info . name ,  p_default ,  p_restart_if_changed ,  p_ignore_value_in_docs ,  p_basic ,  p_internal ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									ProjectSettings : : get_singleton ( ) - > set_custom_property_info ( p_info ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  ret ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : _add_property_info_bind ( const  Dictionary  & p_info )  {  
						 
					
						
							
								
									
										
										
										
											2016-08-16 17:10:53 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND ( ! p_info . has ( " name " ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND ( ! p_info . has ( " type " ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									PropertyInfo  pinfo ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									pinfo . name  =  p_info [ " name " ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND ( ! props . has ( pinfo . name ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									pinfo . type  =  Variant : : Type ( p_info [ " type " ] . operator  int ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_INDEX ( pinfo . type ,  Variant : : VARIANT_MAX ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( p_info . has ( " hint " ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-16 17:10:53 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										pinfo . hint  =  PropertyHint ( p_info [ " hint " ] . operator  int ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( p_info . has ( " hint_string " ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-16 17:10:53 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										pinfo . hint_string  =  p_info [ " hint_string " ] ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-16 17:10:53 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-11-08 19:53:22 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									set_custom_property_info ( pinfo ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-16 17:10:53 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-11-08 19:53:22 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : set_custom_property_info ( const  PropertyInfo  & p_info )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									const  String  & prop_name  =  p_info . name ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND ( ! props . has ( prop_name ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									custom_prop_info [ prop_name ]  =  p_info ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-13 15:04:37 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								const  HashMap < StringName ,  PropertyInfo >  & ProjectSettings : : get_custom_property_info ( )  const  {  
						 
					
						
							
								
									
										
										
										
											2018-05-26 20:19:38 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									return  custom_prop_info ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								bool  ProjectSettings : : is_using_datapack ( )  const  {  
						 
					
						
							
								
									
										
										
										
											2014-02-19 11:57:14 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									return  using_datapack ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-02-19 21:05:16 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								bool  ProjectSettings : : is_project_loaded ( )  const  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  project_loaded ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-08-12 21:43:14 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								bool  ProjectSettings : : _property_can_revert ( const  StringName  & p_name )  const  {  
						 
					
						
							
								
									
										
										
										
											2024-08-06 00:11:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									return  props . has ( p_name ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-01-05 09:16:00 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-08-12 21:43:14 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								bool  ProjectSettings : : _property_get_revert ( const  StringName  & p_name ,  Variant  & r_property )  const  {  
						 
					
						
							
								
									
										
										
										
											2024-08-06 00:11:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									const  RBMap < StringName ,  ProjectSettings : : VariantContainer > : : Element  * value  =  props . find ( p_name ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( value )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										r_property  =  value - > value ( ) . initial . duplicate ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										return  true ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-14 16:41:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-06 00:11:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									return  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-01-05 09:16:00 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2017-01-02 23:03:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-10-05 15:34:34 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : set_setting ( const  String  & p_setting ,  const  Variant  & p_value )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									set ( p_setting ,  p_value ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-06-13 23:35:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								Variant  ProjectSettings : : get_setting ( const  String  & p_setting ,  const  Variant  & p_default_value )  const  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( has_setting ( p_setting ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										return  get ( p_setting ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									}  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										return  p_default_value ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-05 15:34:34 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-03-06 12:14:21 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : refresh_global_class_list ( )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// This is called after mounting a new PCK file to pick up class changes.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									is_global_class_list_loaded  =  false ;  // Make sure we read from the freshly mounted PCK.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									Array  script_classes  =  get_global_class_list ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									for  ( int  i  =  0 ;  i  <  script_classes . size ( ) ;  i + + )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										Dictionary  c  =  script_classes [ i ] ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-01-08 13:21:47 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! c . has ( " class " )  | |  ! c . has ( " language " )  | |  ! c . has ( " path " )  | |  ! c . has ( " base " )  | |  ! c . has ( " is_abstract " )  | |  ! c . has ( " is_tool " ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-03-06 12:14:21 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											continue ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2025-01-08 13:21:47 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										ScriptServer : : add_global_class ( c [ " class " ] ,  c [ " base " ] ,  c [ " language " ] ,  c [ " path " ] ,  c [ " is_abstract " ] ,  c [ " is_tool " ] ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-03-06 12:14:21 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-02-03 20:37:52 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								TypedArray < Dictionary >  ProjectSettings : : get_global_class_list ( )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( is_global_class_list_loaded )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										return  global_class_list ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-25 15:08:32 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									Ref < ConfigFile >  cf ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									cf . instantiate ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-31 10:52:43 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( cf - > load ( get_global_class_list_path ( ) )  = =  OK )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-03 20:37:52 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										global_class_list  =  cf - > get_value ( " " ,  " list " ,  Array ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-25 15:08:32 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									}  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# ifndef TOOLS_ENABLED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										// Script classes can't be recreated in exported project, so print an error.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										ERR_PRINT ( " Could not load global script cache. " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# endif 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-03 20:37:52 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// File read succeeded or failed. If it failed, assume everything is still okay.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// We will later receive updated class data in store_global_class_list().
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									is_global_class_list_loaded  =  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  global_class_list ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-25 15:08:32 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-31 10:52:43 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								String  ProjectSettings : : get_global_class_list_path ( )  const  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  get_project_data_path ( ) . path_join ( " global_script_class_cache.cfg " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-12-25 15:08:32 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : store_global_class_list ( const  Array  & p_classes )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									Ref < ConfigFile >  cf ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									cf . instantiate ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									cf - > set_value ( " " ,  " list " ,  p_classes ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-31 10:52:43 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									cf - > save ( get_global_class_list_path ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-03 20:37:52 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									global_class_list  =  p_classes ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-25 15:08:32 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-07-18 09:22:59 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								bool  ProjectSettings : : has_custom_feature ( const  String  & p_feature )  const  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  custom_features . has ( p_feature ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-08 10:09:19 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								const  HashMap < StringName ,  ProjectSettings : : AutoloadInfo >  & ProjectSettings : : get_autoload_list ( )  const  {  
						 
					
						
							
								
									
										
										
										
											2020-06-17 20:45:08 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									return  autoloads ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : add_autoload ( const  AutoloadInfo  & p_autoload )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_MSG ( p_autoload . name  = =  StringName ( ) ,  " Trying to add autoload with no name. " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									autoloads [ p_autoload . name ]  =  p_autoload ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : remove_autoload ( const  StringName  & p_autoload )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_MSG ( ! autoloads . has ( p_autoload ) ,  " Trying to remove non-existent autoload. " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									autoloads . erase ( p_autoload ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								bool  ProjectSettings : : has_autoload ( const  StringName  & p_autoload )  const  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  autoloads . has ( p_autoload ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								ProjectSettings : : AutoloadInfo  ProjectSettings : : get_autoload ( const  StringName  & p_name )  const  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_V_MSG ( ! autoloads . has ( p_name ) ,  AutoloadInfo ( ) ,  " Trying to get non-existent autoload. " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  autoloads [ p_name ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-12 15:20:12 +07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								const  HashMap < StringName ,  String >  & ProjectSettings : : get_global_groups_list ( )  const  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  global_groups ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : add_global_group ( const  StringName  & p_name ,  const  String  & p_description )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_MSG ( p_name  = =  StringName ( ) ,  " Trying to add global group with no name. " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									global_groups [ p_name ]  =  p_description ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : remove_global_group ( const  StringName  & p_name )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									ERR_FAIL_COND_MSG ( ! global_groups . has ( p_name ) ,  " Trying to remove non-existent global group. " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									global_groups . erase ( p_name ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								bool  ProjectSettings : : has_global_group ( const  StringName  & p_name )  const  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  global_groups . has ( p_name ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : remove_scene_groups_cache ( const  StringName  & p_path )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									scene_groups_cache . erase ( p_path ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : add_scene_groups_cache ( const  StringName  & p_path ,  const  HashSet < StringName >  & p_cache )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									scene_groups_cache [ p_path ]  =  p_cache ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : save_scene_groups_cache ( )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									Ref < ConfigFile >  cf ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									cf . instantiate ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									for  ( const  KeyValue < StringName ,  HashSet < StringName > >  & E  :  scene_groups_cache )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( E . value . is_empty ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											continue ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										Array  list ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										for  ( const  StringName  & group  :  E . value )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											list . push_back ( group ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										cf - > set_value ( E . key ,  " groups " ,  list ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									cf - > save ( get_scene_groups_cache_path ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								String  ProjectSettings : : get_scene_groups_cache_path ( )  const  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  get_project_data_path ( ) . path_join ( " scene_groups_cache.cfg " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : load_scene_groups_cache ( )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									Ref < ConfigFile >  cf ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									cf . instantiate ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( cf - > load ( get_scene_groups_cache_path ( ) )  = =  OK )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										List < String >  scene_paths ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										cf - > get_sections ( & scene_paths ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										for  ( const  String  & E  :  scene_paths )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											Array  scene_groups  =  cf - > get_value ( E ,  " groups " ,  Array ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											HashSet < StringName >  cache ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-24 13:44:21 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											for  ( const  Variant  & scene_group  :  scene_groups )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												cache . insert ( scene_group ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-12 15:20:12 +07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											add_scene_groups_cache ( E ,  cache ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								const  HashMap < StringName ,  HashSet < StringName > >  & ProjectSettings : : get_scene_groups_cache ( )  const  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									return  scene_groups_cache ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-03 20:27:08 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# ifdef TOOLS_ENABLED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : get_argument_options ( const  StringName  & p_function ,  int  p_idx ,  List < String >  * r_options )  const  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									const  String  pf  =  p_function ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( p_idx  = =  0 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( pf  = =  " has_setting "  | |  pf  = =  " set_setting "  | |  pf  = =  " get_setting "  | |  pf  = =  " get_setting_with_override "  | | 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												pf  = =  " set_order "  | |  pf  = =  " get_order "  | |  pf  = =  " set_initial_value "  | |  pf  = =  " set_as_basic "  | | 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												pf  = =  " set_as_internal "  | |  pf  = =  " set_restart_if_changed "  | |  pf  = =  " clear " )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											for  ( const  KeyValue < StringName ,  VariantContainer >  & E  :  props )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												if  ( E . value . hide_from_editor )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
													continue ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												r_options - > push_back ( String ( E . key ) . quote ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									Object : : get_argument_options ( p_function ,  p_idx ,  r_options ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# endif 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : _bind_methods ( )  {  
						 
					
						
							
								
									
										
										
										
											2017-10-05 15:34:34 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ClassDB : : bind_method ( D_METHOD ( " has_setting " ,  " name " ) ,  & ProjectSettings : : has_setting ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									ClassDB : : bind_method ( D_METHOD ( " set_setting " ,  " name " ,  " value " ) ,  & ProjectSettings : : set_setting ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-13 23:35:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ClassDB : : bind_method ( D_METHOD ( " get_setting " ,  " name " ,  " default_value " ) ,  & ProjectSettings : : get_setting ,  DEFVAL ( Variant ( ) ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-13 13:16:49 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ClassDB : : bind_method ( D_METHOD ( " get_setting_with_override " ,  " name " ) ,  & ProjectSettings : : get_setting_with_override ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-03 20:37:52 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ClassDB : : bind_method ( D_METHOD ( " get_global_class_list " ) ,  & ProjectSettings : : get_global_class_list ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-17 09:52:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ClassDB : : bind_method ( D_METHOD ( " get_setting_with_override_and_custom_features " ,  " name " ,  " features " ) ,  & ProjectSettings : : get_setting_with_override_and_custom_features ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-10 15:37:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ClassDB : : bind_method ( D_METHOD ( " set_order " ,  " name " ,  " position " ) ,  & ProjectSettings : : set_order ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ClassDB : : bind_method ( D_METHOD ( " get_order " ,  " name " ) ,  & ProjectSettings : : get_order ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									ClassDB : : bind_method ( D_METHOD ( " set_initial_value " ,  " name " ,  " value " ) ,  & ProjectSettings : : set_initial_value ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-24 04:33:35 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ClassDB : : bind_method ( D_METHOD ( " set_as_basic " ,  " name " ,  " basic " ) ,  & ProjectSettings : : set_as_basic ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-30 21:16:29 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ClassDB : : bind_method ( D_METHOD ( " set_as_internal " ,  " name " ,  " internal " ) ,  & ProjectSettings : : set_as_internal ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ClassDB : : bind_method ( D_METHOD ( " add_property_info " ,  " hint " ) ,  & ProjectSettings : : _add_property_info_bind ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-18 23:31:48 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ClassDB : : bind_method ( D_METHOD ( " set_restart_if_changed " ,  " name " ,  " restart " ) ,  & ProjectSettings : : set_restart_if_changed ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ClassDB : : bind_method ( D_METHOD ( " clear " ,  " name " ) ,  & ProjectSettings : : clear ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									ClassDB : : bind_method ( D_METHOD ( " localize_path " ,  " path " ) ,  & ProjectSettings : : localize_path ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									ClassDB : : bind_method ( D_METHOD ( " globalize_path " ,  " path " ) ,  & ProjectSettings : : globalize_path ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									ClassDB : : bind_method ( D_METHOD ( " save " ) ,  & ProjectSettings : : save ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-09 10:31:47 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ClassDB : : bind_method ( D_METHOD ( " load_resource_pack " ,  " pack " ,  " replace_files " ,  " offset " ) ,  & ProjectSettings : : load_resource_pack ,  DEFVAL ( true ) ,  DEFVAL ( 0 ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									ClassDB : : bind_method ( D_METHOD ( " save_custom " ,  " file " ) ,  & ProjectSettings : : _save_custom_bnd ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-14 18:33:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									ADD_SIGNAL ( MethodInfo ( " settings_changed " ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-12-07 21:31:51 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								void  ProjectSettings : : _add_builtin_input_map ( )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( InputMap : : get_singleton ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-08 10:09:19 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										HashMap < String ,  List < Ref < InputEvent > > >  builtins  =  InputMap : : get_singleton ( ) - > get_builtins ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-07 21:31:51 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-08 10:09:19 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										for  ( KeyValue < String ,  List < Ref < InputEvent > > >  & E  :  builtins )  { 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-07 21:31:51 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											Array  events ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											// Convert list of input events into array
 
							 
						 
					
						
							
								
									
										
										
										
											2025-02-03 14:16:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											for  ( const  Ref < InputEvent >  & event  :  E . value )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												events . push_back ( event ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-07 21:31:51 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											Dictionary  action ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-02-27 17:25:34 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											action [ " deadzone " ]  =  Variant ( InputMap : : DEFAULT_TOGGLE_DEADZONE ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-07 21:31:51 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											action [ " events " ]  =  events ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-08 10:09:19 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											String  action_name  =  " input/ "  +  E . key ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-02 16:54:15 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											GLOBAL_DEF ( action_name ,  action ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-07 21:31:51 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
											input_presets . push_back ( action_name ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								ProjectSettings : : ProjectSettings ( )  {  
						 
					
						
							
								
									
										
										
										
											2020-07-13 14:38:35 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									// Initialization of engine variables should be done in the setup() method,
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// so that the values can be overridden from project.godot or project.binary.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-11-29 15:20:15 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									CRASH_COND_MSG ( singleton  ! =  nullptr ,  " Instantiating a new ProjectSettings singleton is not supported. " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									singleton  =  this ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-07-27 13:26:29 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# ifdef TOOLS_ENABLED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// Available only at runtime in editor builds. Needs to be processed before anything else to work properly.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( ! Engine : : get_singleton ( ) - > is_editor_hint ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										String  editor_features  =  OS : : get_singleton ( ) - > get_environment ( " GODOT_EDITOR_CUSTOM_FEATURES " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										if  ( ! editor_features . is_empty ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											PackedStringArray  feature_list  =  editor_features . split ( " , " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											for  ( const  String  & s  :  feature_list )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
												custom_features . insert ( s ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# endif 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-17 13:44:49 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( " application/config/name " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-19 10:28:53 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : DICTIONARY ,  " application/config/name_localized " ,  PROPERTY_HINT_LOCALIZABLE_STRING ) ,  Dictionary ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : STRING ,  " application/config/description " ,  PROPERTY_HINT_MULTILINE_TEXT ) ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-17 09:53:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( " application/config/version " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-17 23:30:21 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_INTERNAL ( PropertyInfo ( Variant : : STRING ,  " application/config/tags " ) ,  PackedStringArray ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-19 10:28:53 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : STRING ,  " application/run/main_scene " ,  PROPERTY_HINT_FILE ,  " *.tscn,*.scn,*.res " ) ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-17 21:05:38 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " application/run/disable_stdout " ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " application/run/disable_stderr " ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-07-07 20:07:09 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " application/run/print_header " ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-14 20:12:26 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " application/run/enable_alt_space_menu " ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-13 13:56:18 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_RST ( " application/config/use_hidden_project_data_directory " ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-26 19:00:53 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " application/config/use_custom_user_dir " ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " application/config/custom_user_dir_name " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2018-11-18 10:56:21 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " application/config/project_settings_override " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-12 16:38:59 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-03-10 15:09:56 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " application/run/main_loop_type " ,  " SceneTree " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " application/config/auto_accept_quit " ,  true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " application/config/quit_on_go_back " ,  true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-03-21 16:42:23 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : INT ,  " accessibility/general/accessibility_support " ,  PROPERTY_HINT_ENUM ,  " Auto (When Screen Reader is Running),Always Active,Disabled " ) ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : INT ,  " accessibility/general/updates_per_second " ,  PROPERTY_HINT_RANGE ,  " 1,100,1 " ) ,  60 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-11-16 19:53:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									// The default window size is tuned to:
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// - Have a 16:9 aspect ratio,
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// - Have both dimensions divisible by 8 to better play along with video recording,
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
									// - Be displayable correctly in windowed mode on a 1366×  
							 
						 
					
						
							
								
									
										
										
										
											2023-11-10 18:55:48 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : INT ,  " display/window/size/viewport_width " ,  PROPERTY_HINT_RANGE ,  " 1,7680,1,or_greater " ) ,  1152 ) ;  // 8K resolution
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : INT ,  " display/window/size/viewport_height " ,  PROPERTY_HINT_RANGE ,  " 1,4320,1,or_greater " ) ,  648 ) ;  // 8K resolution
 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-12 16:38:59 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-19 10:28:53 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : INT ,  " display/window/size/mode " ,  PROPERTY_HINT_ENUM ,  " Windowed,Minimized,Maximized,Fullscreen,Exclusive Fullscreen " ) ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-15 10:05:41 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-03-11 08:24:23 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									// Keep the enum values in sync with the `Window::WINDOW_INITIAL_POSITION_` enum.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : INT ,  " display/window/size/initial_position_type " ,  PROPERTY_HINT_ENUM ,  " Absolute:0,Center of Primary Screen:1,Center of Other Screen:3,Center of Screen With Mouse Pointer:4,Center of Screen With Keyboard Focus:5 " ) ,  1 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-19 10:28:53 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : VECTOR2I ,  " display/window/size/initial_position " ) ,  Vector2i ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-11 08:24:23 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									// Keep the enum values in sync with the `DisplayServer::SCREEN_` enum.
 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-19 10:28:53 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : INT ,  " display/window/size/initial_screen " ,  PROPERTY_HINT_RANGE ,  " 0,64,1,or_greater " ) ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-05 00:00:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-05-12 16:38:59 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( " display/window/size/resizable " ,  true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( " display/window/size/borderless " ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " display/window/size/always_on_top " ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-15 10:05:41 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " display/window/size/transparent " ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " display/window/size/extend_to_title " ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " display/window/size/no_focus " ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-14 11:05:53 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " display/window/size/sharp_corners " ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-04-06 17:38:00 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " display/window/size/minimize_disabled " ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " display/window/size/maximize_disabled " ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-15 10:05:41 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-02-03 12:09:43 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : INT ,  " display/window/size/window_width_override " ,  PROPERTY_HINT_RANGE ,  " 0,7680,1,or_greater " ) ,  0 ) ;  // 8K resolution
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : INT ,  " display/window/size/window_height_override " ,  PROPERTY_HINT_RANGE ,  " 0,4320,1,or_greater " ) ,  0 ) ;  // 8K resolution
 
							 
						 
					
						
							
								
									
										
										
										
											2022-05-12 16:38:59 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-08-06 22:10:24 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " display/window/energy_saving/keep_screen_on " ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-29 23:14:27 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " animation/warnings/check_invalid_track_paths " ,  true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " animation/warnings/check_angle_interpolation_type_conflicting " ,  true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-19 10:28:53 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : STRING ,  " audio/buses/default_bus_layout " ,  PROPERTY_HINT_FILE ,  " *.tres " ) ,  " res://default_bus_layout.tres " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-18 10:50:34 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : INT ,  " audio/general/default_playback_type " ,  PROPERTY_HINT_ENUM ,  " Stream,Sample " ) ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : INT ,  " audio/general/default_playback_type.web " ,  PROPERTY_HINT_ENUM ,  " Stream,Sample " ) ,  1 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-16 14:18:12 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_RST ( " audio/general/text_to_speech " ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-19 10:28:53 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_RST ( PropertyInfo ( Variant : : FLOAT ,  " audio/general/2d_panning_strength " ,  PROPERTY_HINT_RANGE ,  " 0,2,0.01 " ) ,  0.5f ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_RST ( PropertyInfo ( Variant : : FLOAT ,  " audio/general/3d_panning_strength " ,  PROPERTY_HINT_RANGE ,  " 0,2,0.01 " ) ,  0.5f ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-08-31 15:29:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : INT ,  " audio/general/ios/session_category " ,  PROPERTY_HINT_ENUM ,  " Ambient,Multi Route,Play and Record,Playback,Record,Solo Ambient " ) ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " audio/general/ios/mix_with_others " ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-12-07 21:31:51 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									_add_builtin_input_map ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-23 12:17:15 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-05-21 21:29:24 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									// Keep the enum values in sync with the `DisplayServer::ScreenOrientation` enum.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									custom_prop_info [ " display/window/handheld/orientation " ]  =  PropertyInfo ( Variant : : INT ,  " display/window/handheld/orientation " ,  PROPERTY_HINT_ENUM ,  " Landscape,Portrait,Reverse Landscape,Reverse Portrait,Sensor Landscape,Sensor Portrait,Sensor " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-10 15:09:56 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " display/window/subwindows/embed_subwindows " ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-12 03:35:51 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									// Keep the enum values in sync with the `DisplayServer::VSyncMode` enum.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									custom_prop_info [ " display/window/vsync/vsync_mode " ]  =  PropertyInfo ( Variant : : INT ,  " display/window/vsync/vsync_mode " ,  PROPERTY_HINT_ENUM ,  " Disabled,Enabled,Adaptive,Mailbox " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-05 19:15:56 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " display/window/frame_pacing/android/enable_frame_pacing " ,  true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : INT ,  " display/window/frame_pacing/android/swappy_mode " ,  PROPERTY_HINT_ENUM ,  " pipeline_forced_on,auto_fps_pipeline_forced_on,auto_fps_auto_pipeline " ) ,  2 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-11-12 14:02:10 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# ifdef DISABLE_DEPRECATED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									custom_prop_info [ " rendering/driver/threads/thread_model " ]  =  PropertyInfo ( Variant : : INT ,  " rendering/driver/threads/thread_model " ,  PROPERTY_HINT_ENUM ,  " Safe:1,Separate " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# else 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									custom_prop_info [ " rendering/driver/threads/thread_model " ]  =  PropertyInfo ( Variant : : INT ,  " rendering/driver/threads/thread_model " ,  PROPERTY_HINT_ENUM ,  " Unsafe (deprecated),Safe,Separate " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# endif 
  
						 
					
						
							
								
									
										
										
										
											2025-02-27 19:01:23 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# ifndef PHYSICS_2D_DISABLED 
  
						 
					
						
							
								
									
										
										
										
											2022-01-29 17:35:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " physics/2d/run_on_separate_thread " ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-02-27 19:01:23 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# endif  // PHYSICS_2D_DISABLED
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# ifndef PHYSICS_3D_DISABLED 
  
						 
					
						
							
								
									
										
										
										
											2022-01-29 17:35:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " physics/3d/run_on_separate_thread " ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-02-27 19:01:23 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# endif  // PHYSICS_3D_DISABLED
  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-03-10 15:09:56 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : STRING ,  " display/window/stretch/mode " ,  PROPERTY_HINT_ENUM ,  " disabled,canvas_items,viewport " ) ,  " disabled " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : STRING ,  " display/window/stretch/aspect " ,  PROPERTY_HINT_ENUM ,  " ignore,keep,keep_width,keep_height,expand " ) ,  " keep " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : FLOAT ,  " display/window/stretch/scale " ,  PROPERTY_HINT_RANGE ,  " 0.5,8.0,0.01 " ) ,  1.0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-06 23:41:27 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : STRING ,  " display/window/stretch/scale_mode " ,  PROPERTY_HINT_ENUM ,  " fractional,integer " ) ,  " fractional " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-10 15:09:56 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-19 10:28:53 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : INT ,  " debug/settings/profiler/max_functions " ,  PROPERTY_HINT_RANGE ,  " 128,65535,1 " ) ,  16384 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-04 10:23:10 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_RST ( PropertyInfo ( Variant : : INT ,  " debug/settings/profiler/max_timestamp_query_elements " ,  PROPERTY_HINT_RANGE ,  " 256,65535,1 " ) ,  256 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-26 16:42:02 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-19 10:28:53 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : BOOL ,  " compression/formats/zstd/long_distance_matching " ) ,  Compression : : zstd_long_distance_matching ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : INT ,  " compression/formats/zstd/compression_level " ,  PROPERTY_HINT_RANGE ,  " 1,22,1 " ) ,  Compression : : zstd_level ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : INT ,  " compression/formats/zstd/window_log_size " ,  PROPERTY_HINT_RANGE ,  " 10,30,1 " ) ,  Compression : : zstd_window_log_size ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : INT ,  " compression/formats/zlib/compression_level " ,  PROPERTY_HINT_RANGE ,  " -1,9,1 " ) ,  Compression : : zlib_level ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : INT ,  " compression/formats/gzip/compression_level " ,  PROPERTY_HINT_RANGE ,  " -1,9,1 " ) ,  Compression : : gzip_level ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-06 15:22:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-10-20 15:43:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " debug/settings/crash_handler/message " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											String ( " Please include this when reporting the bug to the project developer. " ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " debug/settings/crash_handler/message.editor " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
											String ( " Please include this when reporting the bug on: https://github.com/godotengine/godot/issues " ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-11-08 19:53:22 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_RST ( PropertyInfo ( Variant : : INT ,  " rendering/occlusion_culling/bvh_build_quality " ,  PROPERTY_HINT_ENUM ,  " Low,Medium,High " ) ,  2 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-13 13:45:57 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_RST ( " rendering/occlusion_culling/jitter_projection " ,  true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-10-20 15:43:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_RST ( " internationalization/rendering/force_right_to_left_layout_direction " ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-17 08:54:07 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : INT ,  " internationalization/rendering/root_node_layout_direction " ,  PROPERTY_HINT_ENUM ,  " Based on Application Locale,Left-to-Right,Right-to-Left,Based on System Locale " ) ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-16 10:34:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( " internationalization/rendering/root_node_auto_translate " ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-20 15:43:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-11-08 19:53:22 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : INT ,  " gui/timers/incremental_search_max_interval_msec " ,  PROPERTY_HINT_RANGE ,  " 0,10000,1,or_greater " ) ,  2000 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-02 18:55:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : FLOAT ,  " gui/timers/tooltip_delay_sec " ,  PROPERTY_HINT_RANGE ,  " 0,5,0.01,or_greater " ) ,  0.5 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# ifdef TOOLS_ENABLED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " gui/timers/tooltip_delay_sec.editor_hint " ,  0.5 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# endif 
  
						 
					
						
							
								
									
										
										
										
											2022-10-20 15:43:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-03-10 15:09:56 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( " gui/common/snap_controls_to_pixels " ,  true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( " gui/fonts/dynamic_fonts/use_oversampling " ,  true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-12-19 14:57:56 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_RST ( PropertyInfo ( Variant : : INT ,  " rendering/rendering_device/vsync/frame_queue_size " ,  PROPERTY_HINT_RANGE ,  " 2,3,1 " ) ,  2 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_RST ( PropertyInfo ( Variant : : INT ,  " rendering/rendering_device/vsync/swapchain_image_count " ,  PROPERTY_HINT_RANGE ,  " 2,4,1 " ) ,  3 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-10 18:55:48 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : INT ,  " rendering/rendering_device/staging_buffer/block_size_kb " ,  PROPERTY_HINT_RANGE ,  " 4,2048,1,or_greater " ) ,  256 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : INT ,  " rendering/rendering_device/staging_buffer/max_size_mb " ,  PROPERTY_HINT_RANGE ,  " 1,1024,1,or_greater " ) ,  128 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : INT ,  " rendering/rendering_device/staging_buffer/texture_upload_region_size_px " ,  PROPERTY_HINT_RANGE ,  " 1,256,1,or_greater " ) ,  64 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-12-06 15:10:09 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : INT ,  " rendering/rendering_device/staging_buffer/texture_download_region_size_px " ,  PROPERTY_HINT_RANGE ,  " 1,256,1,or_greater " ) ,  64 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-05 13:00:20 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_RST ( PropertyInfo ( Variant : : BOOL ,  " rendering/rendering_device/pipeline_cache/enable " ) ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-10 18:55:48 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : FLOAT ,  " rendering/rendering_device/pipeline_cache/save_chunk_size_mb " ,  PROPERTY_HINT_RANGE ,  " 0.000001,64.0,0.001,or_greater " ) ,  3.0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( PropertyInfo ( Variant : : INT ,  " rendering/rendering_device/vulkan/max_descriptors_per_pool " ,  PROPERTY_HINT_RANGE ,  " 1,256,1,or_greater " ) ,  64 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-19 12:48:02 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-09 16:56:16 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_RST ( " rendering/rendering_device/d3d12/max_resource_descriptors_per_frame " ,  16384 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									custom_prop_info [ " rendering/rendering_device/d3d12/max_resource_descriptors_per_frame " ]  =  PropertyInfo ( Variant : : INT ,  " rendering/rendering_device/d3d12/max_resource_descriptors_per_frame " ,  PROPERTY_HINT_RANGE ,  " 512,262144 " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_RST ( " rendering/rendering_device/d3d12/max_sampler_descriptors_per_frame " ,  1024 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									custom_prop_info [ " rendering/rendering_device/d3d12/max_sampler_descriptors_per_frame " ]  =  PropertyInfo ( Variant : : INT ,  " rendering/rendering_device/d3d12/max_sampler_descriptors_per_frame " ,  PROPERTY_HINT_RANGE ,  " 256,2048 " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_RST ( " rendering/rendering_device/d3d12/max_misc_descriptors_per_frame " ,  512 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									custom_prop_info [ " rendering/rendering_device/d3d12/max_misc_descriptors_per_frame " ]  =  PropertyInfo ( Variant : : INT ,  " rendering/rendering_device/d3d12/max_misc_descriptors_per_frame " ,  PROPERTY_HINT_RANGE ,  " 32,4096 " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-20 15:43:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-05-01 17:13:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									// The default value must match the minor part of the Agility SDK version
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// installed by the scripts provided in the repository
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// (check `misc/scripts/install_d3d12_sdk_windows.py`).
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									// For example, if the script installs 1.613.3, the default value must be 613.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-26 16:18:11 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_RST ( PropertyInfo ( Variant : : INT ,  " rendering/rendering_device/d3d12/agility_sdk_version " ,  PROPERTY_HINT_RANGE ,  " 0,10000,1,or_greater,hide_slider " ) ,  613 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-27 16:45:35 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-03-10 15:09:56 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : INT ,  " rendering/textures/canvas_textures/default_texture_filter " ,  PROPERTY_HINT_ENUM ,  " Nearest,Linear,Linear Mipmap,Nearest Mipmap " ) ,  1 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : INT ,  " rendering/textures/canvas_textures/default_texture_repeat " ,  PROPERTY_HINT_ENUM ,  " Disable,Enable,Mirror " ) ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-08-24 22:39:40 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " collada/use_ambient " ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-07-10 10:52:42 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									// Input settings
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( " input_devices/pointing/android/enable_long_press_as_right_click " ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( " input_devices/pointing/android/enable_pan_and_scale_gestures " ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( PropertyInfo ( Variant : : INT ,  " input_devices/pointing/android/rotary_input_scroll_axis " ,  PROPERTY_HINT_ENUM ,  " Horizontal,Vertical " ) ,  1 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-02-18 13:10:40 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " input_devices/pointing/android/override_volume_buttons " ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-27 01:34:36 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_BASIC ( " input_devices/pointing/android/disable_scroll_deadzone " ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-10 10:52:42 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-06-08 17:52:19 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									// These properties will not show up in the dialog. If you want to exclude whole groups, use add_hidden_prefix().
 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-06 15:22:57 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_INTERNAL ( " application/config/features " ,  PackedStringArray ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_INTERNAL ( " internationalization/locale/translation_remaps " ,  PackedStringArray ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_INTERNAL ( " internationalization/locale/translations " ,  PackedStringArray ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-02 14:38:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_INTERNAL ( " internationalization/locale/translations_pot_files " ,  PackedStringArray ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-15 20:56:06 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF_INTERNAL ( " internationalization/locale/translation_add_builtin_strings_to_pot " ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-06-08 17:52:19 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-03-30 13:20:04 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# if !defined(NAVIGATION_2D_DISABLED) || !defined(NAVIGATION_3D_DISABLED) 
  
						 
					
						
							
								
									
										
										
										
											2025-02-26 11:48:13 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " navigation/world/map_use_async_iterations " ,  true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " navigation/avoidance/thread_model/avoidance_use_multiple_threads " ,  true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " navigation/avoidance/thread_model/avoidance_use_high_priority_threads " ,  true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " navigation/pathfinding/max_threads " ,  4 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " navigation/baking/use_crash_prevention_checks " ,  true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " navigation/baking/thread_model/baking_use_multiple_threads " ,  true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									GLOBAL_DEF ( " navigation/baking/thread_model/baking_use_high_priority_threads " ,  true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-30 13:20:04 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								# endif  // !defined(NAVIGATION_2D_DISABLED) || !defined(NAVIGATION_3D_DISABLED)
  
						 
					
						
							
								
									
										
										
										
											2025-02-26 11:48:13 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-06-08 17:52:19 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									ProjectSettings : : get_singleton ( ) - > add_hidden_prefix ( " input/ " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-03-18 02:39:12 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								ProjectSettings : : ProjectSettings ( const  String  & p_path )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									if  ( load_custom ( p_path )  = =  OK )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-17 15:05:20 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										resource_path  =  p_path . get_base_dir ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-18 02:39:12 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
										project_loaded  =  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-19 17:00:46 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								ProjectSettings : : ~ ProjectSettings ( )  {  
						 
					
						
							
								
									
										
										
										
											2023-03-18 02:39:12 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
									if  ( singleton  = =  this )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
										singleton  =  nullptr ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								}