Skip to content

Config

15 tools for project settings and the default map, collision channels and profiles, config diffs, and re-running construction scripts.

Back to the index.

add_collision_channel

Additive Idempotent

Register a custom project collision channel (claims the first free ECC_GameTraceChannelN slot). Idempotent on channel_name. Inverse: remove_collision_channel.

Parameter Type Required Description
channel_name string yes Friendly name for the new channel, e.g. "Harvestable"
default_response string no "Block" | "Ignore" | "Overlap". Defaults to "Block".
trace_type boolean no True for a trace channel, false for an object channel. Defaults to false.
static_object boolean no Whether this channel represents a static object type. Defaults to false.

Returns: { channel_name: string, channel: string, default_response: string, trace_type: bool, static_object: bool, already_existed: bool, note: string }

add_collision_profile

Destructive

Create a project collision profile, or replace an existing one of that name in full (omitted fields reset, custom responses cleared, can_modify not checked), then write Config/DefaultEngine.ini via TryUpdateDefaultConfigFile, unverified. Returns custom_response_count and already_existed; read it back with get_collision_profile; inverse: remove_collision_profile.

Parameter Type Required Description
profile_name string yes Name of the collision profile to create or replace, e.g. "MyPawnProfile"
object_type_name string yes Channel this profile's object type resolves to, e.g. "WorldDynamic" or a custom channel's friendly name
collision_enabled string no "NoCollision" | "QueryOnly" | "PhysicsOnly" | "QueryAndPhysics" | "ProbeOnly" | "QueryAndProbe". Defaults to "QueryAndPhysics".
custom_responses array no [{channel: string, response: "Block"|"Ignore"|"Overlap"}, ...] per-channel overrides
can_modify boolean no Whether this profile is user-editable in the editor UI. Defaults to true.
help_message string no Editor tooltip text.

Returns: { profile_name: string, object_type_name: string, collision_enabled: string, custom_response_count: int, already_existed: bool }

diff_project_config

Read-only

Diff THIS project's Config/Default*.ini against ANOTHER project's, aligned by section+key (pure file read via FConfigFile::Read; no world, no editor state). Surfaces settings that differ or failed to migrate: custom collision channels (GameTraceChannel/ObjectChannel under [/Script/Engine.CollisionProfile]), input mappings, enabled plugins ([Plugins]/[/Script/...]), and every other key. Perspective is THIS -> OTHER: 'added' = present in OTHER but not THIS; 'removed' = present in THIS but not OTHER; 'changed' = present in both with different value(s). Multi-value keys (array-of-struct like +Channels/+ActionMappings) are compared as sorted value lists so hash-ordering never yields a false diff.

Parameter Type Required Description
other_project_dir string yes Filesystem path to the OTHER project. Either the project ROOT (its 'Config' subfolder is used automatically) or a Config folder directly.
files array no Optional array of ini base filenames to compare (e.g. ["DefaultEngine.ini","DefaultInput.ini"]). Default: the union of Default*.ini present in EITHER project's Config folder.
sections array no Optional array of exact section names to restrict the diff to (e.g. ["/Script/Engine.CollisionProfile","/Script/EngineSettings.GameMapsSettings"]). Default: all sections.

Returns: { this_project_dir: string, other_project_dir: string, this_config_dir: string, other_config_dir: string, files: [ { file: string, this_exists: bool, other_exists: bool, this_section_count: int, other_section_count: int, added: [{ section, key, values:[string] }], removed: [{ section, key, values:[string] }], changed: [{ section, key, this_values:[string], other_values:[string] }], added_count: int, removed_count: int, changed_count: int } ], total_added: int, total_removed: int, total_changed: int, identical: bool }

get_collision_profile

Read-only

Read one project collision profile by name, read-only: object_type_name, collision_enabled, can_modify, help_message and custom_responses [{channel, response}], which lists only the per-channel overrides. An unknown name is an error; add_collision_profile is the writer.

Parameter Type Required Description
profile_name string yes Name of an existing collision profile, e.g. "BlockAll" or "Pawn"

Returns: { profile_name: string, object_type_name: string, collision_enabled: string, can_modify: bool, help_message: string, custom_responses: [{channel: string, response: string}] }

get_default_game_map

Read-only

Read UGameMapsSettings EditorStartupMap and GameDefaultMap from the in-memory CDO, and (by default) ALSO from Config/DefaultEngine.ini on disk so a memory-only write cannot masquerade as a persisted one.

Parameter Type Required Description
include_disk_value boolean no Optional bool, default true. Also read the same two keys straight out of Config/DefaultEngine.ini with FConfigFile::Read (never GConfig) and report disk_value + memory_matches_disk.

Returns: { editor_startup_map: string, game_default_map: string, ini_path: string, disk_value: { editor_startup_map: string, game_default_map: string }, memory_matches_disk: bool, disk_checks: [object] }

get_project_info

Read-only

Read the ten project metadata fields of Project Settings > Project > Description (UGeneralProjectSettings, as held in memory, unsaved edits included) without changing anything: project name and version, company name and distinguished name, copyright notice, description, homepage, licensing terms, privacy policy and support contact; any of them can be an empty string when the project never set it. Use it to identify the project in one call. For any other setting read the property with get_project_settings_value (its section names: list_project_setting_sections); to change one of these fields use set_project_settings_value with class_name "/Script/EngineSettings.GeneralProjectSettings" (the short name is not found, since the class is not a UDeveloperSettings); for the engine version and build use get_engine_info; for startup and default maps get_default_game_map. Takes no parameters.

No parameters.

Returns: { project_name: string, project_version: string, company_name: string, company_distinguished_name: string, copyright_notice: string, description: string, homepage: string, licensing_terms: string, privacy_policy: string, support_contact: string }

get_project_settings_value

Read-only

Read one property of a settings class default object (CDO) as its ExportText string; this is the in-memory value, not re-read from the .ini on disk. Returns class_name, property_name and value; an unknown class or property is an error. set_project_settings_value is the writer.

Parameter Type Required Description
class_name string yes Short name of a loaded UDeveloperSettings subclass without the U prefix (e.g. "PhysicsSettings"), or a /Script/Module.Class path
property_name string yes Name of the property on the settings class, e.g. "DefaultGravityZ"

Returns: { class_name: string, property_name: string, value: string }

list_collision_channels

Read-only

List every collision channel of the project, built-in and custom, with its friendly name and default response; each custom channel also says whether it is in use, whether it is a trace or an object channel, and the query it answers to (TraceTypeQueryN or ObjectTypeQueryN: the value a raycast or overlap passes), read from the project's config. Read-only. Add one with add_collision_channel; compare with another project's with diff_collision_channels.

No parameters.

Returns: { channels: [{channel: string, friendly_name: string, value: int, default_response: string, is_custom_game_slot: bool, in_use?: bool, is_trace_type?: bool, query_type?: string, query_index?: int, query_number?: int}], count: int }

list_project_setting_sections

Read-only

List every loaded, concrete UDeveloperSettings subclass (the Project/Editor Settings sections) without loading new modules, read-only. Returns count and sections [{class_name, class_path, container_name, category_name, section_name, section_text}], sorted by class_path and paged with offset/limit; pass class_name to get_project_settings_value or set_project_settings_value.

Parameter Type Required Description
offset integer no Index of the first entry returned, counted from 0 (default 0). Read the next page at the reply's next_offset.
limit integer no Most entries returned per call, 1..1000 (default 100).

Returns: { count: int (entries in this page), sections: [object], total: int, offset: int, limit: int, returned: int, truncated: bool, next_offset: int|null }

remove_collision_channel

Destructive

Free a custom project collision channel that add_collision_channel registered (its ECC_GameTraceChannelN slot), as the Project Settings panel deletes one: the channel leaves DefaultChannelResponses and every collision profile drops its per-channel response to it (custom_responses_removed), then Config/DefaultEngine.ini is written via TryUpdateDefaultConfigFile. A channel that is still the object type of a profile is refused, naming the profiles, and nothing changes; a name no custom channel has is an honest no-op (removed=false). As with add_collision_channel, the engine's channel-name tables (and list_collision_channels, which reads them) keep the old name until the editor restarts; add_collision_channel sees the slot free at once. No undo step: the config file is written at once. Inverse of add_collision_channel.

Parameter Type Required Description
channel_name string yes Friendly name of the custom channel, as given to add_collision_channel

Returns: { channel_name: string, channel?: string, removed: bool, custom_responses_removed: int, profiles_updated: [string], note: string }

remove_collision_profile

Destructive

Delete a project collision profile by name, then write Config/DefaultEngine.ini via TryUpdateDefaultConfigFile. Inverse of add_collision_profile. An engine profile the editor marks not modifiable (can_modify false, like BlockAll or Pawn) is refused, and nothing changes; a name no profile has is an honest no-op (removed=false). Components and Blueprints that still name the profile keep the name and fall back to their own settings. No undo step: the config file is written at once. Read back: get_collision_profile, which then reports it not found.

Parameter Type Required Description
profile_name string yes Name of the collision profile to delete, e.g. "MyPawnProfile"

Returns: { profile_name: string, removed: bool, profile_count: int, note?: string }

rerun_construction_scripts

Destructive

Run AActor::RerunConstructionScripts() on a level actor: destroys every construction-script-generated component and rebuilds it, exactly as dragging the actor in the editor would. This is the ONLY way to reach that function from MCP -- it is ENGINE_API and public but NOT a UFUNCTION, so reflection, call_function and execute_python cannot see it. Use it to find out what a property edit really survives, or to re-apply a Blueprint's construction logic after editing the instance. Reports the before/after component sets instead of a bare success.

Parameter Type Required Description
actor_name string yes Object name (or editor label) of the actor to reconstruct
world string no Optional world selector: absent/'editor' (default) reconstructs the actor in the editor world; 'server' | 'client' | 'pie:N' | 'pie' (ambiguous) target the LIVE Play-In-Editor actor instead; 'game' is an alias of 'pie'. There is no other side effect.

Returns: { actor_name: string, resolved_actor_name: string, actor_label: string, actor_class: string, world: string, has_non_trivial_user_construction_script: bool, actor_survived: bool, components_before: int, components_after: int, component_names_before: [string], component_names_after: [string], destroyed_component_names: [string], created_component_names: [string], verification: object, verification_checks: [object], world_name: string|null, world_package: string|null, world_type: string|null, net_mode: string|null, pie_instance: number }

set_component_property

Destructive Idempotent

Set ONE property on a component of a placed level actor, in the editor world by default or in a live PIE world (world='server' | 'client' | 'pie:N'). Pick it over set_properties when you need the running PIE actor, a property set_properties' edit gate refuses (no CPF_Edit gate here: BlueprintReadWrite-only and DisableEditOnInstance properties are reachable), or proof the value survives the construction script (verify_persistence=true); for a Blueprint's component template use set_blueprint_component_properties. It sends no PreEditChange/PostEditChange, so a component that reacts to Details-panel edits is better written with set_properties. actor_name is the OBJECT name, not the label. The reply returns old_value and final_value read back and stamps which world was written (world_package carries the UEDPIE_N prefix). WARNING: the default editor-world write does NOT reach an actor already running in PIE -- it lands in the next PIE session. Not saved: save_level keeps an editor-world change.

Parameter Type Required Description
actor_name string yes Name of the actor containing the component. Matched against the actor's OBJECT name (GetName) only -- not its editor label.
component_name string yes Name of the component
property_name string yes Name of the property to set
property_value any yes New value. Any JSON type: a bare string (e.g. "/Game/Foo.Foo" object path, "Movable" enum name, "A.B.C" gameplay tag, "(X=1,Y=2,Z=3)" struct text), a number/bool, or nested JSON (a struct object, an array for array/set/tag-container props, an object for map props). Strings still import via ImportText_Direct so prior callers keep working.
world string no Optional world selector: absent/'editor' is the DEFAULT -- it writes the editor world even with PIE running, which is what persists into the next PIE and what makes CPF_DisableEditOnInstance reachable; 'server' (the live PIE world with authority) | 'client' | 'pie:N' write the RUNNING actor instead; 'pie' is the ambiguous resolution and 'game' its alias. An unrecognised value FAILS with a message naming what was asked for and listing the worlds that exist -- it never falls back to another world in silence.
verify_persistence boolean no Optional bool, default false. When true, run AActor::RerunConstructionScripts() and re-read the property to find out whether the value SURVIVES the User Construction Script. Without this, value_changed:true is measured BEFORE the UCS runs, so a property the UCS recomputes (the classic case: RelativeScale3D on a spline/box the UCS rescales) reports as changed and is silently reverted a moment later. Costs a full component rebuild of that actor, and it re-runs in whichever world you selected.

Returns: { actor_name: string, component_name: string, property_name: string, property_type: string (FProperty class name), old_value: string, new_value: string (== final applied value), final_value: string (real value read back off the component), success: bool, value_changed: bool, component_class: string, component_is_active: bool, component_is_registered: bool, world: string (the selector actually used), world_name: string|null, world_package: string|null, world_type: string|null, net_mode: string|null, pie_instance: number }. With verify_persistence=true it also returns { construction_scripts_rerun: bool, has_non_trivial_user_construction_script: bool, post_construction_value: string, survives_construction_script: bool, persistence_note: string, verification: object, verification_checks: [object] }. On failure returns { success:false, error: <precise reason from the importer, or from the world resolver> }.

set_default_game_map

Destructive Idempotent

Set UGameMapsSettings EditorStartupMap / GameDefaultMap, persist them to the VERSIONED Config/DefaultEngine.ini (TryUpdateDefaultConfigFile) and re-read that .ini FROM DISK to prove it landed. When the .ini cannot be written (read-only) the call fails and both maps are put back in memory as they were: reverted and in_memory_editor_startup_map / in_memory_game_default_map say so, read back.

Parameter Type Required Description
editor_startup_map string no Optional long package path of the editor startup map
game_default_map string no Optional long package path of the default game map
verify_disk boolean no Optional bool, default true. Re-read Config/DefaultEngine.ini with FConfigFile::Read (never GConfig, which is the in-memory cache) and report disk_value per map.

Returns: { editor_startup_map: string, game_default_map: string, ini_path: string, is_default_config_class: bool, versioned_ini: bool, write_reported: bool, persist_method: string, disk_value: { editor_startup_map: string, game_default_map: string }, disk_checks: [object], reverted?: bool, in_memory_editor_startup_map?: string, in_memory_game_default_map?: string, persist_error?: string, verification: object, verification_checks: [object] }

set_project_settings_value

Destructive Idempotent

Set one property of a Project Settings class (the class default object of a UDeveloperSettings subclass such as RendererSettings), the way the Project Settings panel does, and persist it: a defaultconfig class goes to the versioned Config/Default<Base>.ini through TryUpdateDefaultConfigFile, any other config class through SaveConfig to its saved ini under Saved/Config (versioned_ini=false). With verify_disk it re-reads that .ini from disk (FConfigFile::Read, not the in-memory GConfig) and fails when the value is not there. Read the current value first with get_project_settings_value; for a raw INI key with no settings class use set_engine_ini_value (it writes only Saved/Config). It runs no PostEditChange, so systems that react to edits in the panel are not notified (some settings need an editor restart), and there is no undo step. A value the property cannot parse, an unknown class or property, or a class that is not a config class is an error and nothing changes. When the .ini cannot be written (read-only) the call fails and the in-memory value is put back as it was: reverted and in_memory_value say so, read back. Idempotent: the same value again rewrites the same line.

Parameter Type Required Description
class_name string yes Settings class short name without the U prefix, e.g. "RendererSettings" (a loaded UDeveloperSettings subclass, case ignored), or a class path such as "/Script/Engine.RendererSettings".
property_name string yes Exact C++ property name on that class, e.g. "bDefaultFeatureBloom" (not the display name shown in the panel); property_is_config in the reply says whether the property is saved to config at all.
value string yes New value as Unreal import text: "True"/"False" for a bool, "1.5" for a float, the enumerator name for an enum, "(X=1,Y=2,Z=3)" for a vector, "/Game/Maps/Main.Main" for an object or soft path.
verify_disk boolean no Optional bool, default true. Re-read the target .ini with FConfigFile::Read (never GConfig, which is the in-memory cache and would just echo the write back) and report disk_value / disk_matches_memory.

Returns: { class_name: string, property_name: string, round_tripped_value: string, ini_path: string, is_default_config_class: bool, versioned_ini: bool, write_reported: bool, persist_method: string, ini_section: string, ini_key: string, property_is_config: bool, disk_present: bool, disk_value: string, disk_values: [string], disk_matches_memory: bool, reverted?: bool, in_memory_value?: string, persist_error?: string, verification: object, verification_checks: [object] }