ProjectSettings¶
Inherits: Object
Category: Core
Brief Description¶
Contains global variables accessible from everywhere.
Properties¶
Methods¶
void | add_property_info ( Dictionary hint ) |
void | clear ( String name ) |
int | get_order ( String name ) const |
Variant | get_setting ( String name ) const |
String | globalize_path ( String path ) const |
bool | has_setting ( String name ) const |
bool | load_resource_pack ( String pack ) |
String | localize_path ( String path ) const |
bool | property_can_revert ( String name ) |
Variant | property_get_revert ( String name ) |
Error | save ( ) |
Error | save_custom ( String file ) |
void | set_initial_value ( String name, Variant value ) |
void | set_order ( String name, int position ) |
void | set_setting ( String name, Variant value ) |
Description¶
Contains global variables accessible from everywhere. Use “ProjectSettings.get_setting(variable)”, “ProjectSettings.set_setting(variable,value)” or “ProjectSettings.has_setting(variable)” to access them. Variables stored in project.godot are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options.
Property Descriptions¶
- Color application/boot_splash/bg_color
- bool application/boot_splash/fullsize
Scale the boot splash image to the full window length when engine starts (will leave it as default pixel size otherwise).
- String application/boot_splash/image
Path to an image used for boot splash.
- String application/config/custom_user_dir_name
This directory is used for storing persistent data (user:// filesystem). If a custom name is set, then system paths will be used to store this on Desktop (AppData on Windows, user ~/.config on Unixes, etc), else the Godot config folder is used. This name needs to be unique, and it’s recommended to set it to something before publishing.
the “use_custom_user_dir” setting must be enabled for this to take effect.
- String application/config/icon
Icon used for the project, set when project loads. Exporters will use this icon when possible to.
- String application/config/name
Name of the project. It is used from both project manager and by the exporters. Overriding this as name.locale allows setting it in multiple languages.
- bool application/config/use_custom_user_dir
Allow the project to save to its own custom user dir (in AppData on windows or ~/.config on unixes). This setting only works for desktop exporters. A name must be set in the “custom_user_dir_name” setting for this to take effect.
- bool application/run/disable_stderr
Disable printing to stderr on exported build.
- bool application/run/disable_stdout
Disable printing to stdout on exported build.
- int application/run/frame_delay_msec
Force a delay between frames in the main loop. This may be useful if you plan to disable vsync.
- bool application/run/low_processor_mode
Turn on low processor mode. This setting only works on desktops. The screen is not redrawn if nothing changes visually. This is meant for writing applications and editors, but is pretty useless (and can hurt performance) on games.
- int application/run/low_processor_mode_sleep_usec
Amount of sleeping between frames when the low_processor_mode is enabled. This effectively reduces CPU usage when this mode is enabled.
- String application/run/main_scene
Path to the main scene file that will be loaded when the project runs.
- float audio/channel_disable_threshold_db
Audio buses will disable automatically when sound goes below a given DB threshold for a given time. This saves CPU as effects assigned to that bus will no longer do any processing.
- float audio/channel_disable_time
Audio buses will disable automatically when sound goes below a given DB threshold for a given time. This saves CPU as effects assigned to that bus will no longer do any processing.
- String audio/driver
- int audio/mix_rate
Mix rate used for audio. In general, it’s better to not touch this and leave it to the host operating system.
- int audio/output_latency
- int audio/video_delay_compensation_ms
Setting to hardcode audio delay when playing video. Best to leave this untouched unless you know what you are doing.
- int compression/formats/gzip/compression_level
Default compression level for gzip. Affects compressed scenes and resources.
- int compression/formats/zlib/compression_level
Default compression level for zlib. Affects compressed scenes and resources.
- int compression/formats/zstd/compression_level
Default compression level for zstd. Affects compressed scenes and resources.
- bool compression/formats/zstd/long_distance_matching
Enable long distance matching in zstd.
- int compression/formats/zstd/window_log_size
- bool debug/gdscript/completion/autocomplete_setters_and_getters
- bool debug/gdscript/warnings/constant_used_as_function
- bool debug/gdscript/warnings/deprecated_keyword
- bool debug/gdscript/warnings/enable
- bool debug/gdscript/warnings/function_conflicts_constant
- bool debug/gdscript/warnings/function_conflicts_variable
- bool debug/gdscript/warnings/function_may_yield
- bool debug/gdscript/warnings/function_used_as_property
- bool debug/gdscript/warnings/incompatible_ternary
- bool debug/gdscript/warnings/integer_division
- bool debug/gdscript/warnings/narrowing_conversion
- bool debug/gdscript/warnings/property_used_as_function
- bool debug/gdscript/warnings/return_value_discarded
- bool debug/gdscript/warnings/standalone_expression
- bool debug/gdscript/warnings/treat_warnings_as_errors
- bool debug/gdscript/warnings/unassigned_variable
- bool debug/gdscript/warnings/unassigned_variable_op_assign
- bool debug/gdscript/warnings/unreachable_code
- bool debug/gdscript/warnings/unsafe_call_argument
- bool debug/gdscript/warnings/unsafe_cast
- bool debug/gdscript/warnings/unsafe_method_access
- bool debug/gdscript/warnings/unsafe_property_access
- bool debug/gdscript/warnings/unused_argument
- bool debug/gdscript/warnings/unused_class_variable
- bool debug/gdscript/warnings/unused_signal
- bool debug/gdscript/warnings/unused_variable
- bool debug/gdscript/warnings/variable_conflicts_function
- bool debug/gdscript/warnings/void_assignment
- String debug/settings/crash_handler/message
- int debug/settings/fps/force_fps
- int debug/settings/gdscript/max_call_stack
Maximum call stack allowed for debugging GDScript.
- int debug/settings/profiler/max_functions
Maximum amount of functions per frame allowed when profiling.
- bool debug/settings/stdout/print_fps
Print frames per second to stdout. Not very useful in general.
- bool debug/settings/stdout/verbose_stdout
Print more information to stdout when running. It shows info such as memory leaks, which scenes and resources are being loaded, etc.
- int debug/settings/visual_script/max_call_stack
Maximum call stack in visual scripting, to avoid infinite recursion.
- String display/mouse_cursor/custom_image
Custom image for the mouse cursor.
- Vector2 display/mouse_cursor/custom_image_hotspot
Hotspot for the custom mouse cursor image.
- bool display/window/allow_per_pixel_transparency
Allow per pixel transparency in a Desktop window. This affects performance if not needed, so leave it off.
- bool display/window/dpi/allow_hidpi
Allow HiDPI display on Windows and OSX. On Desktop Linux, this can’t be enabled or disabled.
- bool display/window/energy_saving/keep_screen_on
Force keep the screen on, so the screensaver does not take over. Works on Desktop and Mobile.
- String display/window/handheld/orientation
Default orientation for cell phone or tablet.
- bool display/window/per_pixel_transparency
- bool display/window/per_pixel_transparency_splash
- bool display/window/size/always_on_top
Force the window to be always on top.
- bool display/window/size/borderless
Force the window to be borderless.
- bool display/window/size/fullscreen
Set the window to full screen when it starts.
- int display/window/size/height
Set the main window height. On desktop, this is the default window size. Stretch mode settings use this also as a reference when enabled.
- bool display/window/size/resizable
Allow the window to be resizable by default.
- int display/window/size/test_height
Test a different height for the window. The main use for this is to test with stretch modes.
- int display/window/size/test_width
Test a different width for the window. The main use for this is to test with stretch modes.
- int display/window/size/width
Set the main window width. On desktop, this is the default window size. Stretch mode settings use this also as a reference when enabled.
- bool display/window/vsync/use_vsync
Use VSync. Don’t be stupid, don’t turn this off.
- bool editor/active
Internal editor setting, don’t touch.
- int gui/common/default_scroll_deadzone
- bool gui/common/swap_ok_cancel
Enable swap OK and Cancel buttons on dialogs. This is because Windows/MacOS/Desktop Linux may use them in different order, so the GUI swaps them depending on the host OS. Disable this behavior by turning this setting off.
- String gui/theme/custom
Use a custom theme resource, set a path to it here.
- String gui/theme/custom_font
USe a custom default font resource, set a path to it here.
- bool gui/theme/use_hidpi
Make sure the theme used works with hidpi.
- int gui/timers/incremental_search_max_interval_msec
Timer setting for incremental search in Tree, IntemList, etc. controls.
- float gui/timers/text_edit_idle_detect_sec
Timer for detecting idle in the editor.
- Dictionary input/ui_accept
- Dictionary input/ui_cancel
- Dictionary input/ui_down
- Dictionary input/ui_end
- Dictionary input/ui_focus_next
- Dictionary input/ui_focus_prev
- Dictionary input/ui_home
- Dictionary input/ui_left
- Dictionary input/ui_page_down
- Dictionary input/ui_page_up
- Dictionary input/ui_right
- Dictionary input/ui_select
- Dictionary input/ui_up
- bool input_devices/pointing/emulate_mouse_from_touch
- bool input_devices/pointing/emulate_touch_from_mouse
- String layer_names/2d_physics/layer_1
- String layer_names/2d_physics/layer_10
- String layer_names/2d_physics/layer_11
- String layer_names/2d_physics/layer_12
- String layer_names/2d_physics/layer_13
- String layer_names/2d_physics/layer_14
- String layer_names/2d_physics/layer_15
- String layer_names/2d_physics/layer_16
- String layer_names/2d_physics/layer_17
- String layer_names/2d_physics/layer_18
- String layer_names/2d_physics/layer_19
- String layer_names/2d_physics/layer_2
- String layer_names/2d_physics/layer_20
- String layer_names/2d_physics/layer_3
- String layer_names/2d_physics/layer_4
- String layer_names/2d_physics/layer_5
- String layer_names/2d_physics/layer_6
- String layer_names/2d_physics/layer_7
- String layer_names/2d_physics/layer_8
- String layer_names/2d_physics/layer_9
- String layer_names/2d_render/layer_1
- String layer_names/2d_render/layer_10
- String layer_names/2d_render/layer_11
- String layer_names/2d_render/layer_12
- String layer_names/2d_render/layer_13
- String layer_names/2d_render/layer_14
- String layer_names/2d_render/layer_15
- String layer_names/2d_render/layer_16
- String layer_names/2d_render/layer_17
- String layer_names/2d_render/layer_18
- String layer_names/2d_render/layer_19
- String layer_names/2d_render/layer_2
- String layer_names/2d_render/layer_20
- String layer_names/2d_render/layer_3
- String layer_names/2d_render/layer_4
- String layer_names/2d_render/layer_5
- String layer_names/2d_render/layer_6
- String layer_names/2d_render/layer_7
- String layer_names/2d_render/layer_8
- String layer_names/2d_render/layer_9
- String layer_names/3d_physics/layer_1
- String layer_names/3d_physics/layer_10
- String layer_names/3d_physics/layer_11
- String layer_names/3d_physics/layer_12
- String layer_names/3d_physics/layer_13
- String layer_names/3d_physics/layer_14
- String layer_names/3d_physics/layer_15
- String layer_names/3d_physics/layer_16
- String layer_names/3d_physics/layer_17
- String layer_names/3d_physics/layer_18
- String layer_names/3d_physics/layer_19
- String layer_names/3d_physics/layer_2
- String layer_names/3d_physics/layer_20
- String layer_names/3d_physics/layer_3
- String layer_names/3d_physics/layer_4
- String layer_names/3d_physics/layer_5
- String layer_names/3d_physics/layer_6
- String layer_names/3d_physics/layer_7
- String layer_names/3d_physics/layer_8
- String layer_names/3d_physics/layer_9
- String layer_names/3d_render/layer_1
- String layer_names/3d_render/layer_10
- String layer_names/3d_render/layer_11
- String layer_names/3d_render/layer_12
- String layer_names/3d_render/layer_13
- String layer_names/3d_render/layer_14
- String layer_names/3d_render/layer_15
- String layer_names/3d_render/layer_16
- String layer_names/3d_render/layer_17
- String layer_names/3d_render/layer_18
- String layer_names/3d_render/layer_19
- String layer_names/3d_render/layer_2
- String layer_names/3d_render/layer_20
- String layer_names/3d_render/layer_3
- String layer_names/3d_render/layer_4
- String layer_names/3d_render/layer_5
- String layer_names/3d_render/layer_6
- String layer_names/3d_render/layer_7
- String layer_names/3d_render/layer_8
- String layer_names/3d_render/layer_9
- String locale/fallback
- String locale/test
- bool logging/file_logging/enable_file_logging
Log all output to a file.
- String logging/file_logging/log_path
Path to logs withint he project. Using an user:// based path is recommended.
- int logging/file_logging/max_log_files
Amount of log files (used for rotation)/
- int memory/limits/message_queue/max_size_kb
Godot uses a message queue to defer some function calls. If you run out of space on it (you will see an error), you can increase the size here.
- int memory/limits/multithreaded_server/rid_pool_prealloc
This is used by servers when used in multi threading mode (servers and visual). RIDs are preallocated to avoid stalling the server requesting them on threads. If servers get stalled too often when loading resources in a thread, increase this number.
- int network/limits/debugger_stdout/max_chars_per_second
Maximum amount of characters allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection.
- int network/limits/debugger_stdout/max_errors_per_frame
Maximum amount of errors allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection.
- int network/limits/debugger_stdout/max_messages_per_frame
Maximum amount of messages allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection.
- int network/limits/packet_peer_stream/max_buffer_po2
Default size of packet peer stream for deserializing godot data. Over this size, data is dropped.
- int network/limits/websocket_client/max_in_buffer_kb
- int network/limits/websocket_client/max_in_packets
- int network/limits/websocket_client/max_out_buffer_kb
- int network/limits/websocket_client/max_out_packets
- int network/limits/websocket_server/max_in_buffer_kb
- int network/limits/websocket_server/max_in_packets
- int network/limits/websocket_server/max_out_buffer_kb
- int network/limits/websocket_server/max_out_packets
- int network/remote_fs/page_read_ahead
Amount of read ahead used by remote filesystem. Improves latency.
- int network/remote_fs/page_size
Page size used by remote filesystem.
- int node/name_casing
When creating nodes names automatically, set the type of casing in this project. This is mostly an editor setting.
- int node/name_num_separator
What to use to separate node name from number. This is mostly an editor setting.
- String physics/2d/physics_engine
- int physics/2d/thread_model
Set whether physics is run on the main thread or a separate one. Running the server on a thread increases performance, but restricts API Access to only physics process.
- bool physics/3d/active_soft_world
- String physics/3d/physics_engine
- int physics/common/physics_fps
Frames per second used in the physics. Physics always needs a fixed amount of frames per second.
- float physics/common/physics_jitter_fix
Fix to improve physics jitter, specially on monitors where refresh rate is different than physics FPS.
- Color rendering/environment/default_clear_color
Default background clear color. Overridable per Viewport using its Environment. See Environment.background_mode and Environment.background_color in particular. To change this default color programmatically, use VisualServer.set_default_clear_color.
- int rendering/limits/buffers/blend_shape_max_buffer_size_kb
Max buffer size for blend shapes. Any blend shape bigger than this will not work.
- int rendering/limits/buffers/canvas_polygon_buffer_size_kb
Max buffer size for drawing polygons. Any polygon bigger than this will not work.
- int rendering/limits/buffers/canvas_polygon_index_buffer_size_kb
Max index buffer size for drawing polygons. Any polygon bigger than this will not work.
- int rendering/limits/buffers/immediate_buffer_size_kb
Max buffer size for drawing immediate objects (ImmediateGeometry nodes). Nodes using more than this size will not work.
- int rendering/limits/rendering/max_renderable_elements
Max amount of elements renderable in a frame. If more than this are visible per frame, they will be dropped. Keep in mind elements refer to mesh surfaces and not mesh themselves.
- float rendering/limits/time/time_rollover_secs
Shaders have a time variable that constantly increases. At some point it needs to be rolled back to zero to avoid numerical errors on shader animations. This setting specifies when.
- bool rendering/quality/2d/use_pixel_snap
Force snapping of polygons to pixels in 2D rendering. May help in some pixel art styles.
- String rendering/quality/depth_prepass/disable_for_vendors
Disable depth pre-pass for some GPU vendors (usually mobile), as their architecture already does this.
- bool rendering/quality/depth_prepass/enable
Do a previous depth pass before rendering materials. This increases performance in scenes with high overdraw, when complex materials and lighting are used.
- int rendering/quality/directional_shadow/size
Size in pixels of the directional shadow.
- int rendering/quality/directional_shadow/size.mobile
- String rendering/quality/driver/driver_fallback
Whether to allow falling back to other graphics drivers if the preferred driver is not available. Best means use the best working driver (this is the default). Never means never fall back to another driver even if it does not work. This means the project will not run if the preferred driver does not function.
- String rendering/quality/driver/driver_name
- int rendering/quality/filters/anisotropic_filter_level
Maximum Anisotropic filter level used for textures when anisotropy enabled.
- bool rendering/quality/filters/use_nearest_mipmap_filter
Force to use nearest mipmap filtering when using mipmaps. This may increase performance in mobile as less memory bandwidth is used.
- int rendering/quality/intended_usage/framebuffer_allocation
Strategy used for framebuffer allocation. The simpler it is, the less memory it uses (but the least features it supports).
- int rendering/quality/intended_usage/framebuffer_allocation.mobile
- bool rendering/quality/reflections/high_quality_ggx
For reflection probes and panorama backgrounds (sky), use a high amount of samples to create ggx blurred versions (used for roughness).
- bool rendering/quality/reflections/high_quality_ggx.mobile
- bool rendering/quality/reflections/texture_array_reflections
For reflection probes and panorama backgrounds (sky), use a texture array instead of mipmaps. This reduces jitter noise on reflections, but costs more performance and memory.
- bool rendering/quality/reflections/texture_array_reflections.mobile
- bool rendering/quality/shading/force_blinn_over_ggx
- bool rendering/quality/shading/force_blinn_over_ggx.mobile
- bool rendering/quality/shading/force_lambert_over_burley
- bool rendering/quality/shading/force_lambert_over_burley.mobile
- bool rendering/quality/shading/force_vertex_shading
Force vertex shading for all rendering. This can increase performance a lot, but also reduces quality immensely. Can work to optimize on very low end mobile.
- bool rendering/quality/shading/force_vertex_shading.mobile
- int rendering/quality/shadow_atlas/quadrant_0_subdiv
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
- int rendering/quality/shadow_atlas/quadrant_1_subdiv
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
- int rendering/quality/shadow_atlas/quadrant_2_subdiv
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
- int rendering/quality/shadow_atlas/quadrant_3_subdiv
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
- int rendering/quality/shadow_atlas/size
Size for shadow atlas (used for point and omni lights). See documentation.
- int rendering/quality/shadow_atlas/size.mobile
- int rendering/quality/shadows/filter_mode
Shadow filter mode. The more complex the filter, the more memory bandwidth required.
- int rendering/quality/shadows/filter_mode.mobile
- bool rendering/quality/subsurface_scattering/follow_surface
Improves quality of subsurface scattering, but cost significantly increases.
- int rendering/quality/subsurface_scattering/quality
Quality setting for subsurface scaterring (samples taken).
- int rendering/quality/subsurface_scattering/scale
- bool rendering/quality/subsurface_scattering/weight_samples
Weight subsurface scattering samples. Helps to avoid reading samples from unrelated parts of the screen.
- bool rendering/quality/voxel_cone_tracing/high_quality
Use high quality voxel cone tracing (looks better, but requires a higher end GPU).
- int rendering/threads/thread_model
Thread model for rendering. Rendering on a thread can vastly improve performance, but syncinc to the main thread can cause a bit more jitter.
- bool rendering/vram_compression/import_bptc
- bool rendering/vram_compression/import_etc
If the project uses this compression (usually low end mobile), texture importer will import these.
- bool rendering/vram_compression/import_etc2
If the project uses this compression (usually high end mobile), texture importer will import these.
- bool rendering/vram_compression/import_pvrtc
If the project uses this compression (usually iOS), texture importer will import these.
- bool rendering/vram_compression/import_s3tc
If the project uses this compression (usually Desktop and Consoles), texture importer will import these.
- Script script
Method Descriptions¶
- void add_property_info ( Dictionary hint )
Add a custom property info to a property. The dictionary must contain: name:String), and optionally hint:int), hint_string:String.
Example:
ProjectSettings.set("category/property_name", 0)
var property_info = {
"name": "category/property_name",
"type": TYPE_INT,
"hint": PROPERTY_HINT_ENUM,
"hint_string": "one,two,three"
}
ProjectSettings.add_property_info(property_info)
- void clear ( String name )
Clear the whole configuration (not recommended, may break things).
Return the order of a configuration value (influences when saved to the config file).
Convert a localized path (res://) to a full native OS path.
Return true if a configuration value is present.
Loads the contents of the .pck or .zip file specified by pack
into the resource filesystem (res://). Returns true on success.
Note: If a file from pack
shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from pack
.
Convert a path to a localized path (res:// path).
Returns true if the specified property exists and its initial value differs from the current value.
Returns the initial value of the specified property. Returns null if the property does not exist.
- Error save ( )
Saves the configuration to the project.godot file.
Saves the configuration to a custom file.
Set the order of a configuration value (influences when saved to the config file).