Item Amount

1 min read

Updated on November 21, 2025

Introduction

A simple class that stores an Item, and an Amount.

This class also Clamps and Rounds depending on the Item’s Precision Type setting.

Item Amounts have a custom property drawer which look like the below.

Setting up

There is no setup, all Item Amounts are handled internally or through other parts of code such as the Resource class. However you can see what they look like by adding one on an Item Container in the Item Amounts list.

Scripting

To understand and use this class in your own scripts, you can see below from the script.

/// <summary>
/// Get the ItemAmount.Amount which includes Floor for Item.Integer precision type, or RoundToPrecision for Item.Float precision type
/// </summary>
public double Amount

/// <summary>
/// Create a new ItemAmount with an Item and an Amount
/// </summary>
/// <param name="item">The Item to assign to this ItemAmount</param>
/// <param name="amount">The Amount of this Item</param>
public ItemAmount(Item item, double amount)

/// <summary>
/// Creates a new copy of ItemAmount with a given ItemAmount 
/// </summary>
/// <param name="itemAmount">The ItemAmount to copy</param>
public ItemAmount(ItemAmount itemAmount)