Skip to main content

GDTKItem.GetStatValue

Declaration#

public float GetStatValue(string id)

Parameters#

NameDescription
idId of the stat to get

Description#

Get the value of a stat by id

Usage#

using NullSave.GDTK.Inventory;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(GDTKItem target, string statId)    {        float result = target.GetStatValue(statId);    }

}

Declaration#

public float GetStatValue(string id, Inventory inventory)

Parameters#

NameDescription
idId of the stat to get
inventoryInventory requesting value

Description#

Get the value of a stat by id

Usage#

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