[SOLVED] How can I check what was the last instantiated object?


How can I check what object (from variable OR prefab itself) was the last one instantiated? I am trying to instantiate two different objects, in this order: 1st, 2nd, 1st, 2nd,…

Put the instantiated objects into array or ArrayList on instantiating it, so the last one will have the last index in the array.

how do you put them into an array tho