Course contentsShow
← Unreal Engine Game Development
Lesson 84 of 8801. Foundations and Editor WorkflowFree lesson

Persisting Editor Tool Settings with Configuration Files

Save and load custom tool preferences and user settings to ensure your editor extensions maintain state across different project sessions.

In this lesson, you will learn how to make your custom editor tool settings "stick" so that your configuration remains saved even after you close and reopen the Unreal Editor.

Why Persist Settings?

When you build custom editor tools—like a batch-renaming utility or a specialized asset importer—you often want the tool to remember user preferences, such as a default export path or a specific "is-enabled" checkbox state. If you don't save these, the user is forced to reconfigure your tool every single time they launch the engine.

The Config System

Unreal Engine uses a robust configuration system based on .ini files. To store your tool's state, we use a class marked with the Config specifier. By creating a dedicated UObject to hold your settings, the engine automatically handles the serialization of your properties to a configuration file located in the project's Saved/Config/Editor.ini folder.

Implementation

To persist settings, define a UCLASS that inherits from UObject and include the Config keyword in the macro. Any property you mark with Config will be automatically saved:

UCLASS(Config = MyEditorTool)
class UMyToolSettings : public UObject
{
    GENERATED_BODY()

public:
    // This property will be saved to the .ini file
    UPROPERTY(Config, EditAnywhere, Category = "Settings")
    FString DefaultExportPath;

    // This property will also be saved automatically
    UPROPERTY(Config, EditAnywhere, Category = "Settings")
    bool bEnableAutoSave;
};

To load these settings in your editor tool, you use GetMutableDefault<UMyToolSettings>(). When you change a value, calling SaveConfig() on that object commits the current values to the disk.

This mechanism is "session-persistent," meaning once a user sets their preference, the engine writes it to the disk. The next time the project opens, your tool simply requests the default object, and Unreal fills in those variables with the data previously written to the .ini file. This creates a professional, polished experience where the tool feels like a native part of the editor ecosystem.

Key Takeaway: Use the Config UPROPERTY specifier combined with SaveConfig() to automatically bridge the gap between volatile memory and persistent disk storage, ensuring your tool settings survive across engine restarts.