DefaultPlayerMappableKeyProfileClass
DefaultPlayerMappableKeyProfileClass
#Overview
name: DefaultPlayerMappableKeyProfileClass
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of DefaultPlayerMappableKeyProfileClass is to define the default class for player-mappable key profiles in the Enhanced Input system of Unreal Engine 5. This setting variable is part of the input management system, specifically for handling customizable player input configurations.
The Enhanced Input plugin relies on this setting variable. It is used within the EnhancedInput module, which is an extension of Unreal Engine’s input system that provides more advanced input handling capabilities.
The value of this variable is set in the UEnhancedInputDeveloperSettings constructor, as seen in the first code excerpt. It is initialized with UEnhancedPlayerMappableKeyProfile::StaticClass(), which means it defaults to the UEnhancedPlayerMappableKeyProfile class.
This variable interacts with other Enhanced Input system components, particularly the UEnhancedInputUserSettings class and the FPlayerMappableKeyProfileCreationArgs struct. It’s used to determine the default class type when creating new player-mappable key profiles.
Developers must be aware that this variable is part of the developer settings, which means it’s intended for configuration by the development team rather than end-users. Changing this value will affect the default behavior of player input profile creation throughout the project.
Best practices when using this variable include:
- Ensure that any custom class set as the default inherits from UEnhancedPlayerMappableKeyProfile to maintain compatibility with the Enhanced Input system.
- If creating a custom default profile class, make sure it’s properly implemented and tested before setting it as the default.
- Consider the implications of changing this setting on existing player profiles and input configurations in your game.
- Use this setting in conjunction with other Enhanced Input settings for a cohesive input management strategy.
- Document any custom profile class used as the default to ensure other team members understand its purpose and functionality.
#Setting Variables
#References In INI files
Location: <Workspace>/Projects/Lyra/Config/DefaultInput.ini:50, section: [/Script/EnhancedInput.EnhancedInputDeveloperSettings]
- INI Section:
/Script/EnhancedInput.EnhancedInputDeveloperSettings
- Raw value:
/Script/LyraGame.LyraPlayerMappableKeyProfile
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/EnhancedInput/Source/EnhancedInput/Private/EnhancedInputDeveloperSettings.cpp:24
Scope (from outer to inner):
file
function UEnhancedInputDeveloperSettings::UEnhancedInputDeveloperSettings
Source code excerpt:
: Super(Initializer)
, UserSettingsClass(UEnhancedInputUserSettings::StaticClass())
, DefaultPlayerMappableKeyProfileClass(UEnhancedPlayerMappableKeyProfile::StaticClass())
, DefaultWorldInputClass(UEnhancedPlayerInput::StaticClass())
, bSendTriggeredEventsWhenInputIsFlushed(true)
, bEnableUserSettings(false)
, bEnableDefaultMappingContexts(true)
, bShouldOnlyTriggerLastActionInChord(true)
, bLogOnDeprecatedConfigUsed(true)
#Loc: <Workspace>/Engine/Plugins/EnhancedInput/Source/EnhancedInput/Private/UserSettings/EnhancedInputUserSettings.cpp:1193
Scope (from outer to inner):
file
function FPlayerMappableKeyProfileCreationArgs::FPlayerMappableKeyProfileCreationArgs
Source code excerpt:
FPlayerMappableKeyProfileCreationArgs::FPlayerMappableKeyProfileCreationArgs()
: ProfileType(GetDefault<UEnhancedInputDeveloperSettings>()->DefaultPlayerMappableKeyProfileClass.Get())
, ProfileIdentifier(FGameplayTag::EmptyTag)
, UserId(PLATFORMUSERID_NONE)
, DisplayName(FText::GetEmpty())
, bSetAsCurrentProfile(true)
{
}
#Loc: <Workspace>/Engine/Plugins/EnhancedInput/Source/EnhancedInput/Public/EnhancedInputDeveloperSettings.h:82
Scope (from outer to inner):
file
class class UEnhancedInputDeveloperSettings : public UDeveloperSettingsBackedByCVars
Source code excerpt:
*/
UPROPERTY(config, EditAnywhere, NoClear, Category = "Enhanced Input|User Settings", meta=(editCondition = "bEnableUserSettings"))
TSoftClassPtr<UEnhancedPlayerMappableKeyProfile> DefaultPlayerMappableKeyProfileClass;
/** The default player input class that the Enhanced Input world subsystem will use. */
UPROPERTY(config, EditAnywhere, NoClear, Category = "Enhanced Input|World Subsystem", meta=(editCondition = "bEnableWorldSubsystem"))
TSoftClassPtr<UEnhancedPlayerInput> DefaultWorldInputClass;
/**