Skip to main content

GDTKItem.GetStat

Declaration#

public GDTKStatProxy GetStat(string id)

Parameters#

NameDescription
idId of the stat to get

Description#

Get a stat by id

Usage#

using NullSave.GDTK.Inventory;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(GDTKItem target, string statId)    {        // Output can be GDTKItemStat (default)        // Or GDTKStat if GDTK: Stats installed and Advanced Stats activated        var result = target.GetStat(statId);    }

}

Declaration#

public GDTKStatProxy GetStat(string id, Inventory inventory)

Parameters#

NameDescription
idId of the stat to get
inventoryInventory requesting stat

Description#

Get a stat by id

Usage#

Example
using NullSave.GDTK.Inventory;using UnityEngine;
public class CodeSample : MonoBehaviour{
    public void Example(GDTKItem target, string id)    {        GDTKStatProxy result = target.GetStat(id);    }
}