Skip to main content

StackingInstructionSetup

An abstract class in Root.Township, Alta.Inventory.

Base for working out where stacked copies of an item go inside some bounds, from StackingInstructions. Used by StorageOrganizer.

Constructors​

MemberWhat it is
protected StackingInstructionSetup()Creates a StackingInstructionSetup with default values.

Properties​

MemberWhat it is
int MaxQuantity { get; protected set; }How many items fit.
Matrix4x4[] Positions { get; protected set; }Local placement matrices, one per slot.
Matrix4x4[] WorldPositions { get; protected set; }World placement matrices, one per slot.

Methods​

MemberWhat it is
abstract void Setup(Bounds bounds, Matrix4x4 localToWorld, StackingInstructions instructions)Computes the positions for the bounds and instructions, then the world positions.
void SetupPositions(Matrix4x4 localToWorld)Recomputes the world positions from a local-to-world matrix.

Used in​

Members of other types that take, return or hold a StackingInstructionSetup: