Show / Hide Table of Contents

Interface IAttributeSet

An IAttributeSet defines the list of IAttribute that a player (that has an AbilitySystemComponent) possesses. The attributes themselves are assigned to the IAttributeSet by dragging of type IAttribute to the IAttributeSet in the Unity Inspector.

This will usually include IAttributes such as Health, Mana, Speed, etc.

Namespace: GameplayAbilitySystem.Interfaces
Assembly: Assembly-CSharp-firstpass.dll
Syntax
public interface IAttributeSet

Properties

| Improve this Doc View Source

Attributes

List of IAttribute that belong to this IAttributeSet

Declaration
List<Attribute> Attributes { get; set; }
Property Value
Type Description
List<Attribute>

List of IAttribute

| Improve this Doc View Source

AttributeValueChanged

Event called whenever a attribute value changes

Declaration
AttributeChangeDataEvent AttributeValueChanged { get; }
Property Value
Type Description
AttributeChangeDataEvent

Event is raised with a payload of AttributeChangeDataEvent

Methods

| Improve this Doc View Source

GetOwningAbilitySystem()

Gets the AbilitySystemComponent that owns this Attribute Set

Declaration
AbilitySystemComponent GetOwningAbilitySystem()
Returns
Type Description
AbilitySystemComponent

Ability System Component which owns this IAttributeSet

| Improve this Doc View Source

PostGameplayEffectExecute(GameplayEffect, GameplayModifierEvaluatedData)

Called after modification to attribute. This should be used to execute reactions to attribute change, such as dying when health is 0, or showing a "damaged" animation when health decreases

Declaration
void PostGameplayEffectExecute(GameplayEffect Effect, GameplayModifierEvaluatedData EvalData)
Parameters
Type Name Description
GameplayEffect Effect

Effect that was executed

GameplayModifierEvaluatedData EvalData

Attribute modifier

| Improve this Doc View Source

PreAttributeBaseChange(IAttribute, ref Single)

Called before modification to the base attribute value. This should be used to enforce clamping rules (e.g.) health can't be greater than max health.

Declaration
void PreAttributeBaseChange(IAttribute Attribute, ref float NewBaseValue)
Parameters
Type Name Description
IAttribute Attribute
System.Single NewBaseValue

New value of the attribute. This is passed as ref, so this method can modify it.

| Improve this Doc View Source

PreAttributeChange(IAttribute, ref Single)

Called before modification to the current attribute value. This should be used to enforce clamping rules (e.g.) health can't be greater than max health

Declaration
void PreAttributeChange(IAttribute Attribute, ref float NewValue)
Parameters
Type Name Description
IAttribute Attribute
System.Single NewValue

New value of the attribute. This is passed as ref, so this method can modify it.

| Improve this Doc View Source

PreGameplayEffectExecute(GameplayEffect, GameplayModifierEvaluatedData)

Decides whether this attribute change should take effect

Declaration
bool PreGameplayEffectExecute(GameplayEffect Effect, GameplayModifierEvaluatedData EvalData)
Parameters
Type Name Description
GameplayEffect Effect

Effect being executed

GameplayModifierEvaluatedData EvalData

Attribute modifier

Returns
Type Description
System.Boolean

True if attribute change should take effect, false otherwise

  • Improve this Doc
  • View Source
Back to top Generated by DocFX