Blueprint console variables
Blueprint console variables are custom game console variables registered by Auto Settings from Blueprint assets. Use them when a Blueprint-only project needs a game-owned value such as game.MasterVolume or game.Language.
For C++ projects, prefer C++ console variables and Unreal's native console variable system instead of Blueprint console variable assets.
Supported value types
| Type | Blueprint Class | Use Cases | Examples |
|---|---|---|---|
| Boolean | ConsoleVariable Boolean | Feature toggles, on/off settings | game.ShowSubtitles |
| Integer | ConsoleVariable Integer | Discrete levels, enumerated values | game.DifficultyLevel |
| Float | ConsoleVariable Float | Continuous ranges, percentages | game.MasterVolume, game.MouseSensitivity |
| String | ConsoleVariable String | Text values, language settings | game.Language, ui.Theme |
For Integer and Float types, use the Clamp node in OnChanged events to validate ranges and prevent invalid values.
Create a Blueprint console variable
Create the Blueprint class
- Right-click in the Content Browser and select Blueprint Class.
- Search for the parent class
ConsoleVariable. - Choose the appropriate type from the table above.
Configure class defaults
Open your Blueprint and set the Class Defaults:
- Name: The console variable name, such as
game.MasterVolume. - Default Value: Initial value used when Auto Settings registers this custom console variable.
- Help Text: Description shown in console help.
Example:
Name: "game.MasterVolume"
Default Value: 1.0
Help Text: "Master volume multiplier (0.0 to 1.0)"
Use a prefix to group related settings, such as game.* for gameplay, audio.* for audio, or ui.* for interface. Avoid spaces and special characters.
Implement the OnChanged event
- Switch to the Event Graph.
- Right-click and add Event On Changed.
- Implement the logic that should run when the value changes.
Set Call On Changed When Registered to run OnChanged immediately when Auto Settings registers the callback.
For other callback options, see Responding to console variable changes.
Example:
The example project uses a more complete implementation with Push Sound Mix Modifier and Set Sound Mix Class Override for proper audio mixing.
Your Blueprint console variable is automatically registered during Auto Settings initialization.