UAttributeSet

Defines the set of all GameplayAttributes for your game Games should subclass this and add [FGameplayAttributeData](API\Plugins\GameplayAbilities\FGameplayAttributeData) properties to represent attributes like health, damage, etc AttributeSets are added to the actors as subobjects, and then registered with the AbilitySystemComponent It often desired to have several sets per project that inherit from each other You could make a base health set, then have a player set that inherits from it and adds more attributes

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

GameplayAbilities

Header

/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/AttributeSet.h

Include

#include "AttributeSet.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(DefaultToInstanced, Blueprintable)
class UAttributeSet : public UObject

Remarks

Defines the set of all GameplayAttributes for your game Games should subclass this and add FGameplayAttributeData properties to represent attributes like health, damage, etc AttributeSets are added to the actors as subobjects, and then registered with the AbilitySystemComponent It often desired to have several sets per project that inherit from each other You could make a base health set, then have a player set that inherits from it and adds more attributes

Variables

Name Description

Protected variable

uint32: 1

 

bNetAddressable

Is this attribute set safe to ID over the network by name?

Constructors

Name Description

Public function

UAttributeSet

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const

FGameplayAbi...

 

GetActorInfo()

Public function Const

UAbilitySyst...

 

GetOwningAbilitySystemComponent()

Public function Const

AActor *

 

GetOwningActor()

Gets information about owning actor

Public function Virtual

void

 

InitFromMetaDataTable

(
    const UDataTable* DataTable
)

Initializes attribute data from a meta DataTable

Public function Virtual Const

void

 

OnAttributeAggregatorCreated

(
    const FGameplayAttribute& Attribut...,
    FAggregator* NewAggregator
)

Callback for when an FAggregator is created for an attribute in this set.

Public function Virtual

void

 

PostGameplayEffectExecute

(
    const FGameplayEffectModCallbackDat...
)

Called just before a GameplayEffect is executed to modify the base value of an attribute.

Public function Virtual Const

void

 

PreAttributeBaseChange

(
    const FGameplayAttribute& Attribut...,
    float& NewValue
)

This is called just before any modification happens to an attribute's base value when an attribute aggregator exists.

Public function Virtual

void

 

PreAttributeChange

(
    const FGameplayAttribute& Attribut...,
    float& NewValue
)

An "On Aggregator Change" type of event could go here, and that could be called when active gameplay effects are added or removed to an attribute aggregator.

Public function Virtual

bool

 

PreGameplayEffectExecute

Called just before modifying the value of an attribute.

Public function Virtual

void

 

PrintDebug()

Print debug information to the log

Public function

void

 

SetNetAddressable()

This signifies the attribute set can be ID'd by name over the network.

Public function Virtual Const

bool

 

ShouldInitProperty

(
    bool FirstInit,
    FProperty* PropertyToInit
)

Override to disable initialization for specific properties

Overridden from UObject

Name Description

Public function Virtual Const

bool

 

IsNameStableForNetworking()

IsNameStableForNetworking means an object can be referred to its path name (relative to outer) over the network

Public function Virtual Const

bool

 

IsSupportedForNetworking()

IsSupportedForNetworking means an object can be referenced over the network

Public function Virtual

void

 

PostNetReceive()

Called right after receiving a bunch

Public function Virtual

void

 

PreNetReceive()

Called right before receiving a bunch

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss