Navigation
API > API/Plugins > API/Plugins/GameplayAbilities
Immunity is blocking the application of other GameplayEffectSpecs. This registers a global handler on the ASC to block the application of other GameplayEffectSpecs.
| Name | UImmunityGameplayEffectComponent |
| Type | class |
| Header File | /Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/GameplayEffectComponents/ImmunityGameplayEffectComponent.h |
| Include Path | #include "GameplayEffectComponents/ImmunityGameplayEffectComponent.h" |
Syntax
UCLASS (DisplayName="Immunity to Other Effects", MinimalAPI)
class UImmunityGameplayEffectComponent : public UGameplayEffectComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UGameplayEffectComponent → UImmunityGameplayEffectComponent
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UImmunityGameplayEffectComponent() |
Constructor to set EditorFriendlyName | GameplayEffectComponents/ImmunityGameplayEffectComponent.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ImmunityQueries | TArray< FGameplayEffectQuery > | Grants immunity to GameplayEffects that match this query. | GameplayEffectComponents/ImmunityGameplayEffectComponent.h |
|
Functions
Public
Overridden from UGameplayEffectComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool OnActiveGameplayEffectAdded
(
FActiveGameplayEffectsContainer& ActiveGEContainer, |
We need to register our callback to check for Immunity | GameplayEffectComponents/ImmunityGameplayEffectComponent.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual EDataValidationResult IsDataValid
(
FDataValidationContext& Context |
Warn about instant Gameplay Effects as they do not persist over time (and therefore cannot grant immunity) | GameplayEffectComponents/ImmunityGameplayEffectComponent.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AllowGameplayEffectApplication
(
const FActiveGameplayEffectsContainer& ActiveGEContainer, |
We register with the AbilitySystemComponent to try and block any GESpecs we think we should be immune to | GameplayEffectComponents/ImmunityGameplayEffectComponent.h |