StatModifierPlugin.BeforeAdd
Declaration#
public virtual void BeforeAdd(ItemContainer container, Boolean& cancelAdd)Parameters#
| Name | Description |
|---|---|
| container | Container requesting the add |
| cancelAdd | Forbid 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); }
}