Skip to content

Logic

Introduction

An implementation for a settings item controlling how the setting is configured, saved and applied

Dependencies

The SettingsItem relies on other components of this plugin to work:

  • Game Instance: Used to monitor for input device changes and handle saving/loading game data

Implementations

There is already implementations for all settings items. But you can expand this if needed

Category Name Description
Audio SettingsItemAudioMaster An implementation for the audio master settings item
Audio SettingsItemAudioMusic An implementation for the audio music settings item
Audio SettingsItemAudioEffects An implementation for the audio effects settings item
Audio SettingsItemAudioUi An implementation for the audio UI settings item
Audio SettingsItemAudioVoice An implementation for the audio voice settings item
Graphics SettingsItemGraphicsResolution An implementation for the graphics resolution settings item
Graphics SettingsItemGraphicsFullscreen An implementation for the graphics fullscreen settings item
Graphics SettingsItemGraphicsViewDistance An implementation for the graphics view distance settings item
Graphics SettingsItemGraphicsAntiAliasing An implementation for the graphics anti-aliasing settings item
Graphics SettingsItemGraphicsPostProcessing An implementation for the graphics post processing settings item
Graphics SettingsItemGraphicsShadowQuality An implementation for the graphics shadow quality settings item
Graphics SettingsItemGraphicsTextureQuality An implementation for the graphics texture quality settings item
Graphics SettingsItemGraphicsVisualEffects An implementation for the graphics visual effects settings item
Graphics SettingsItemGraphicsShadingQuality An implementation for the graphics shading quality settings item
Graphics SettingsItemGraphicsVsync An implementation for the graphics vsync settings item
Graphics SettingsItemGraphicsFpsIndicator An implementation for the graphics FPS indicator settings item
Accessibility SettingsItemAccessibilityColorBlindMode An implementation for the accessibility color blind mode settings item
Accessibility SettingsItemAccessibilityColorBlindModeSeverity An implementation for the accessibility color blind mode severity settings item
Controls SettingsItemControlsRemap An implementation for the controls settings item

API Reference

Functions

Name Description Params Return
ConfigureMenuItem Configure the menu item Config (void)
The settings config specified in the game instance

Settings (USettingsData*)
The current settings data

MenuItem (UMenuItem*)
The menu item to configure
SaveSettings Save the settings managed by a menu item Settings (USettingsData*)
The current settings data

MenuItem (UMenuItem*)
The menu item containing the updated settings
USettingsData*
The updated settings data
ApplySettings Apply the settings World (UObject*)
The world context

Config (USettingsConfig*)
The settings config specified in the game instance

Settings (USettingsData*)
The current settings data

Blueprint Usage

You can use the SettingsItem using Blueprints by adding one of the following nodes:

  • Ultimate Starter Kit > Settings > Configure Menu Item
  • Ultimate Starter Kit > Settings > Save Settings
  • Ultimate Starter Kit > Settings > Apply Settings

C++ Usage

Before you can use the plugin, you first need to enable the plugin in your Build.cs file:

PublicDependencyModuleNames.Add("USK");

The SettingsItem can now be used in any of your C++ files:

#include "USK/Settings/SettingsItem.h"

void ATestActor::Test()
{
    // SettingsItem is a pointer to the USettingsItem
    SettingsItem->ConfigureMenuItem(Config, Settings, MenuItem);
    USettingsData* SaveSettingsValue = SettingsItem->SaveSettings(Settings, MenuItem);
    SettingsItem->ApplySettings(World, Config, Settings);
}