AbilitySystem.Fix.SkipUnmappedReferencesCheckForGameplayCues
AbilitySystem.Fix.SkipUnmappedReferencesCheckForGameplayCues
#Overview
name: AbilitySystem.Fix.SkipUnmappedReferencesCheckForGameplayCues
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Skip the bHasMoreUnmappedReferences check for GameplayCues which never worked as intended and causes issues when set properly (may be deprecated soon)
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of AbilitySystem.Fix.SkipUnmappedReferencesCheckForGameplayCues is to address an issue in the Gameplay Ability System related to GameplayCues. Specifically, it’s designed to skip a check for unmapped references in GameplayCues that was not functioning as intended and was causing problems when properly set.
-
This setting variable is primarily used in the Gameplay Abilities plugin, which is part of Unreal Engine’s Gameplay Ability System.
-
The value of this variable is set to true by default in the GameplayEffect.cpp file. It’s declared as a console variable, which means it can be changed at runtime through the console.
-
This variable interacts directly with the associated boolean variable bSkipUnmappedReferencesCheckForGameplayCues. They share the same value and are used interchangeably in the code.
-
Developers should be aware that this is a fix introduced in UE 5.4 and may be deprecated soon, as indicated in the comment. It’s important to note that this variable is specifically addressing a problem with the bHasMoreUnmappedReferences check for GameplayCues.
-
Best practices when using this variable include:
- Monitoring its status in future engine versions, as it may be deprecated.
- Understanding that enabling this skip might hide potential issues with unmapped references in GameplayCues.
- Using it as a temporary solution while ensuring that GameplayCues are properly set up to avoid unmapped references.
Regarding the associated variable bSkipUnmappedReferencesCheckForGameplayCues:
The purpose of bSkipUnmappedReferencesCheckForGameplayCues is to provide a boolean flag that can be used in the codebase to determine whether to skip the problematic check for unmapped references in GameplayCues.
-
This variable is used within the Gameplay Abilities plugin, specifically in the FActiveGameplayEffectsContainer class.
-
Its value is set by the console variable AbilitySystem.Fix.SkipUnmappedReferencesCheckForGameplayCues.
-
It interacts directly with the console variable and is used in conditional statements to determine whether to skip certain checks or operations related to GameplayCues.
-
Developers should be aware that this variable is used in performance-sensitive areas, such as within a QUICK_SCOPE_CYCLE_COUNTER block, which suggests it’s part of a frequently executed path.
-
Best practices for using this variable include:
- Ensuring that it’s only used as intended within the Gameplay Ability System.
- Monitoring its usage and impact on GameplayCue behavior.
- Being prepared to refactor code that relies on this variable if it becomes deprecated in future engine versions.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Private/GameplayEffect.cpp:90
Scope (from outer to inner):
file
namespace UE::GameplayEffect
Source code excerpt:
// Fix introduced in UE5.4
bool bSkipUnmappedReferencesCheckForGameplayCues = true;
FAutoConsoleVariableRef CVarSkipUnmappedReferencesCheckForGameplayCues{ TEXT("AbilitySystem.Fix.SkipUnmappedReferencesCheckForGameplayCues"), bSkipUnmappedReferencesCheckForGameplayCues,
TEXT("Skip the bHasMoreUnmappedReferences check for GameplayCues which never worked as intended and causes issues when set properly (may be deprecated soon)"), ECVF_Default };
#if WITH_EDITOR
namespace EditorOnly
{
// Helper function that allows us to guard against upgrading versions (in case a bug is discovered while the product is live)
#Associated Variable and Callsites
This variable is associated with another variable named bSkipUnmappedReferencesCheckForGameplayCues
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Private/GameplayEffect.cpp:89
Scope (from outer to inner):
file
namespace UE::GameplayEffect
Source code excerpt:
// Fix introduced in UE5.4
bool bSkipUnmappedReferencesCheckForGameplayCues = true;
FAutoConsoleVariableRef CVarSkipUnmappedReferencesCheckForGameplayCues{ TEXT("AbilitySystem.Fix.SkipUnmappedReferencesCheckForGameplayCues"), bSkipUnmappedReferencesCheckForGameplayCues,
TEXT("Skip the bHasMoreUnmappedReferences check for GameplayCues which never worked as intended and causes issues when set properly (may be deprecated soon)"), ECVF_Default };
#if WITH_EDITOR
namespace EditorOnly
{
// Helper function that allows us to guard against upgrading versions (in case a bug is discovered while the product is live)
#Loc: <Workspace>/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Private/GameplayEffect.cpp:4870
Scope (from outer to inner):
file
function void FActiveGameplayEffectsContainer::PostReplicatedReceive
Source code excerpt:
QUICK_SCOPE_CYCLE_COUNTER(STAT_ActiveGameplayEffectsContainer_NetDeltaSerialize_CheckRepGameplayCues);
if ( LIKELY(UE::GameplayEffect::bSkipUnmappedReferencesCheckForGameplayCues) )
{
if (Owner->IsReadyForGameplayCues())
{
Owner->HandleDeferredGameplayCues(this);
}
}