Tomasz Klin - Blueprint Project Settings

Make your own pages in Project Settings and Editor Preferences from a Blueprint. Their values live in ini files, like the engine's own settings, and any Blueprint reads them with one node.

Some values belong to the whole project rather than to any actor or level in it: the address of the server your game talks to, a switch for the debug overlay, the options of a system you reuse from game to game. Others belong to the editor: the preferences of your Editor Utility Widgets and in-house tools. Unreal Engine keeps both kinds on a settings page — in Project Settings or in Editor Preferences — backed by an ini file, and a page of your own normally takes a C++ class. Blueprint Project Settings makes it from a Blueprint.

Make one in a minute

  1. In the Content Browser choose Add > Blueprint > Blueprint Project Settings and name it — BP_GameConfig, say.

  2. Add the variables your project is configured with — Server Address, Show Debug Overlay, Autosave Interval — and tick Config Variable on each one. Categories, descriptions and slider ranges work as they do on any Blueprint variable, and they shape the page.

  3. Compile. Project Settings now has your page: your variables, in their groups, with your values. A change made there is written straight to DefaultGame.ini, the same file the engine keeps its own game settings in.

Stored in ini files, like the engine's own settings

There is no file format of the plugin's own: the values are ordinary lines in ordinary ini files, beside the engine's own settings.

  • Plain text. Each settings Blueprint has a section of its own, one line per value, readable and editable in any text editor.

  • Made for source control. A changed setting is a changed line: a diff shows which value moved and from what, and two people changing two settings merge like any other text. Kept in a Data Asset, the same values would be a binary file only one person can safely change at a time.

  • The engine's layers. DefaultGame.ini holds the project's values, checked in and the same for everyone. UserGame.ini holds one developer's overrides and is never checked in, and a platform's own ini can change a value for that platform alone.

  • The file you choose. Game, Engine, Input, Editor, the per-user editor file or one named by you, and which copy of it a save writes. Class Defaults shows the exact path those choices add up to.

Read it from any Blueprint

Add Get Settings, pick your settings Blueprint, and drag its variables straight off the node. There is no cast, no reference to pass around and nothing to spawn. It works in any Blueprint — a character, a game mode, a widget, an Editor Utility Widget — and at any time: the values are loaded before any Blueprint runs.

That is the whole setup, and there is no C++ in it.

Editor Preferences for your own tools

Editor tools have settings too. Point a settings Blueprint's page at Editor Preferences and it becomes the preferences of your Editor Utility Widgets and scripted tools — the grid a placement tool snaps to, the colour it highlights with — under a group of your own. Store them per user and each developer keeps their own values, for this project or for every project on their machine, out of source control. Options the whole team shares go in DefaultEditor.ini instead, checked in with the project. Editor settings stay in the editor: a packaged game has no editor ini files.

When you need more

  • Save from a Blueprint. Save Settings writes the current values to the ini, so a tool with a window of its own can change its options without a trip to the settings panel. Reload Settings discards what was not saved.

  • Move and rename freely. Give the settings a Section Id and the Blueprint can be moved or renamed without losing a single stored value.

  • Reset to Defaults restores the values the Blueprint was authored with, from the page or from a node.

  • React to changes with the On Settings Loaded and On Settings Saved events, and follow a value from a widget through On Settings Changed.

  • Your defaults stay yours. Saving or cooking a settings Blueprint writes the defaults set in its Class Defaults, never the values stored in the ini.

  • Packaged builds just work. Settings Blueprints are found and packaged even though nothing references them, and the game reads their values from its ini files before any Blueprint runs.

  • Save any config variable. Save Config Variables and Reload Config Variables give the engine's own Config Variable checkbox the save it never had, on any Blueprint.

Full C++ source is included.

Documentation: Blueprint Project Settings documentation

Support: ask questions, report bugs and suggest features in #blueprint-project-settings, the plugin's own channel on Discord.