Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

useItemCount

useItemCount(item): number

How many of item the player’s bag holds, across every stack and whatever each copy’s data, as countItem counts them in a system: a HUD’s key count, <Counter icon="key" label="Keys" value={useItemCount("key")} />. It re-renders only when the count changes.

Parameter Type
item string

number