Skip to main content

StatsAndEffects.UnsubscribeFromAttributeChange

Declaration#

public virtual void UnsubscribeFromAttributeChange(SimpleEvent handler, string attributeId)

Parameters#

NameDescription
handlerHandler to remove
attributeIdId of attribute

Description#

Remove subscription from Attribute changes

Usage#

Example
using NullSave.GDTK.Stats;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(StatsAndEffects source)    {        string id = source.database.attributes[0].info.id;        source.UnsubscribeFromAttributeChange(AttributeChange, id);    }
    private void AttributeChange()    {        Debug.Log("Attribute has been added or removed.");    }
}