GDTKItem.GetStat
Declaration#
public GDTKStatProxy GetStat(string id)Parameters#
| Name | Description |
|---|---|
| id | Id 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#
| Name | Description |
|---|---|
| id | Id of the stat to get |
| inventory | Inventory 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); }
}