Navigation
API > API/Plugins > API/Plugins/GameplayAbilities
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
| Name | UAttributeSet |
| Type | class |
| Header File | /Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/AttributeSet.h |
| Include Path | #include "AttributeSet.h" |
Syntax
UCLASS (DefaultToInstanced, Blueprintable, MinimalAPI)
class UAttributeSet : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UAttributeSet
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UAttributeSet
(
const FObjectInitializer& ObjectInitializer |
AttributeSet.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FGameplayAbilityActorInfo * GetActorInfo() |
AttributeSet.h | ||
UAbilitySystemComponent * GetOwningAbilitySystemComponent() |
AttributeSet.h | ||
UAbilitySystemComponent * GetOwningAbilitySystemComponentChecked() |
AttributeSet.h | ||
AActor * GetOwningActor() |
Gets information about owning actor | AttributeSet.h | |
virtual void InitFromMetaDataTable
(
const UDataTable* DataTable |
Initializes attribute data from a meta DataTable | AttributeSet.h | |
virtual void OnAttributeAggregatorCreated
(
const FGameplayAttribute& Attribute, |
Callback for when an FAggregator is created for an attribute in this set. | AttributeSet.h | |
virtual void PostAttributeBaseChange
(
const FGameplayAttribute& Attribute, |
Called just after any modification happens to an attribute's base value when an attribute aggregator exists. | AttributeSet.h | |
virtual void PostAttributeChange
(
const FGameplayAttribute& Attribute, |
Called just after any modification happens to an attribute. | AttributeSet.h | |
virtual void PostGameplayEffectExecute
(
const FGameplayEffectModCallbackData& Data |
Called just after a GameplayEffect is executed to modify the base value of an attribute. | AttributeSet.h | |
virtual void PreAttributeBaseChange
(
const FGameplayAttribute& Attribute, |
This is called just before any modification happens to an attribute's base value when an attribute aggregator exists. | AttributeSet.h | |
virtual void PreAttributeChange
(
const FGameplayAttribute& Attribute, |
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. | AttributeSet.h | |
virtual bool PreGameplayEffectExecute
(
FGameplayEffectModCallbackData& Data |
Called just before modifying the value of an attribute. | AttributeSet.h | |
virtual void PrintDebug() |
Print debug information to the log | AttributeSet.h | |
void SetNetAddressable() |
This signifies the attribute set can be ID'd by name over the network. | AttributeSet.h | |
virtual bool ShouldInitProperty
(
bool FirstInit, |
Override to disable initialization for specific properties | AttributeSet.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsNameStableForNetworking() |
AttributeSet.h | ||
virtual bool IsSupportedForNetworking() |
AttributeSet.h | ||
virtual void PostNetReceive() |
AttributeSet.h | ||
virtual void PreNetReceive() |
AttributeSet.h | ||
virtual void RegisterReplicationFragments
(
UE::Net::FFragmentRegistrationContext& Context, |
Register all replication fragments | AttributeSet.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void GetAttributesFromSetClass
(
const TSubclassOf< UAttributeSet >& AttributeSetClass, |
Populates (without emptying) a TArray with all FGameplayAttributes from an attribute set class. | AttributeSet.h |