Skip to main content

StatModifierPlugin.BeforeAdd

Declaration#

public virtual void BeforeAdd(ItemContainer container, Boolean& cancelAdd)

Parameters#

NameDescription
containerContainer requesting the add
cancelAddForbid adding indicator

Description#

Method run before item is added to inventory

Usage#

Example
using NullSave.GDTK.Inventory;using NullSave.GDTK.Stats;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(StatModifierPlugin target, ItemContainer other)    {        bool cancelAdd = false;        target.BeforeAdd(other, ref cancelAdd);    }
}