Skip to main content

ItemContainer.SplitStack

Declaration#

public void SplitStack(GDTKItem item, Int32 moveCount)

Parameters#

NameDescription
itemItem stack to split
moveCountCount to move to new stack

Description#

Split a stack into two

Usage#

using NullSave.GDTK.Inventory;using UnityEngine;
public class CodeSample : MonoBehaviour{
    public void Example(ItemContainer target, GDTKItem other)    {        target.SplitStack(other, other.count / 2);    }
}