- Home /
Question by
uri2563 · Oct 15, 2019 at 09:56 AM ·
prefabinventory systemclones
How to find the number of a specific clone
Im making an inventory system and i want each item slot to have a number representing the place of the slot in the inventory. Every slot is a clone of one slot prefab. is there a way to do it?
unitys.png
(382.8 kB)
Comment
Answer by misher · Oct 15, 2019 at 10:35 AM
For the slot number, you can use the position of the slot's transform in the hierarchy for this usecase. Slot Number = transform.GetSiblingIndex();