Code Snippet – Adding your own page to Project Settings

The Project Settings page in UE4 is a menu which lets you customize a whole bunch of settings for your project. But did you know that you can add your own settings in there? Its quite simple!

Here’s an example of what you’ll produce with the below code

Project Settings dialog with custom section

Project Settings dialog with custom section

 Start by declaring and implementing the Settings class with the properties you want to save. This is just a standard class declaration, decorated with Config settings

Once you’ve declared your settings class, you need to use the Settings Module to register it. Start by including the ISettingsModule header –  #include "ISettingsModule.h"

Then you can quite simply call the RegisterSettings function!

The first three parameters of the RegisterSettings function are simply to place it in the Project settings, the Plugins section on a page called My Settings. Don’t forget to also call UnregisterSettings.

Once you have set this up, these settings will be saved into the Ini file and readable/writable as follows:  int32 MySavedInt = GetDefault<UMySettings>()->SomeIntProperty;

Leave a Reply