Skip to main content

PlayerCharacterStats.AddPerk

Declaration#

public virtual GDTKPerk AddPerk(string id, IUniquelyIdentifiable source)

Parameters#

NameDescription
idId of the Perk to add
sourceSource associated with request

Description#

Adds a Perk to the object

Usage#

Example
using NullSave.GDTK.Stats;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(PlayerCharacterStats source)    {        string id = source.database.perks[0].info.id;        source.AddPerk(id);    }
}