Skip to main content

GDTKItemStatSource.Inherit

Declaration#

public void Inherit(GDTKItemStatSource parent)

Parameters#

NameDescription
parentParent to inherit from

Description#

Inherit values from parent

Usage#

Example
using NullSave.GDTK.Inventory;using UnityEngine;
public class CodeSample : MonoBehaviour{
    public void Example(GDTKItemStatSource target, GDTKItemStatSource other)    {        // With the introduction of Item Inheritance, stats also needed to inherit        // This method allows for stats of the parent to be copied in        // Ids in the parent that already exist in the child are ignored and presumed overwritten        target.Inherit(other);    }
}