|
If I have an array of gameobjects (used to quickly iterate through those specific objects to enable/disable them, index positions don't matter), and I destroy one of the gameobjects through some means other than As a side question, would
(comments are locked)
|
|
The array and the object are completely separate. Destroying the gameobject will leave a null value in the array. RemoveAt will remove it from the array, but not from the game. You'll have to do both manually. That's kind of what I expected, but wanted to verify. Thanks!
Nov 09 '10 at 11:55 PM
Dylan Cristy
Found that question& answer useful too. Just to be sure Adam: "RemoveAt will remove it from the array" means it will leave a null value at its index or it will shorten the array's lenght?
Jan 19 '11 at 03:13 PM
schwertfisch
Based on the example they give for RemoveAt in the scripting reference, I'm pretty sure it will shorten the array's length. http://unity3d.com/support/documentation/ScriptReference/Array.RemoveAt.html
Jan 25 '11 at 03:29 AM
Dylan Cristy
(comments are locked)
|
