Hi I made a code that I will eventually use for stacking objects, but are at the moment just testing if it executes correctly which it doesn't and I can't seem to figure out what is wrong.
Are you trying to achieve something like this?:
(i.e. iterate through every point in a 200x200x100 structure?)
Using nested 'for' loops like this is the typical method for iterating through a 2d or 3d set, however the figures you have give a rather large number of total iterations. For this reason, I have the Debug.Log line commented out in my example, because if you run it, that code will generate 4 million debug.log lines (which may cause your computer to seem as though it has locked up while printing them all to the console).
Note, if you're planning to stack gameobjects using something like this, you'll end up with 200 x 200 x 100 objects - that's 4 million gameobjects - something that is not really feasible to work with in Unity.
answered Mar 26 '10 at 12:43 PM