|
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. The Code:
(comments are locked)
|
|
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. I am making a kind of a stesstest for unity to test how many objects I can have in a scene at the same time, I am not generating all 4 million objects at the same time, but I wanted to have an array of positions where I could put the objects as I generate them. I generate objects by pressing the mousebutton.
Mar 28 '10 at 06:01 AM
Asle
(comments are locked)
|
