Hi,
i have a basic level that consists of a two-dimensional array of GameObjects. How can I delete all of them?
i did
var board:GameObject[,];
board = new GameObject[3,3];
and then i want a lil loop that wipes everything out.
for (var i = 0; i < board.length; i++)
{
for (var j = 0; j < board*.length; j++)*
- {*
-
Destroy(board[i,j]);*
- }*
}
doesn’t work, though(“‘length’ is not a member of ‘UnityEngine.GameObject’.”)