Hi, I’ve been trying to get an inventory system using a builtin array to store my items, however when I try filling this with empty objects it will not fill it. At all.
Here’s the code I’m using to fill up my array, it gives me no errors, however the array remains empty in the inspector:
var emptySlot : GameObject;
emptySlot = GameObject.FindWithTag("Empty");
var InvArray = new GameObject[25];
var amountOfSlots = InvArray.length;
function Awake()
{
for (var i: int = 0; i < amountOfSlots; i++)
{
InvArray *= emptySlot;*
- }*
}