|
This might be answered but honestly couldn't find an answer. How do I create dynamic variable names inside a loop for example? Or is this even possible? for(i = 0; i < 10; i++) { var number+i = i; }
(comments are locked)
|
|
Not sure to fully understand your question, but from the code sample you provide, it seems that you're looking for arrays.
See here for a documentation on arrays : http://unity3d.com/support/documentation/ScriptReference/Array.html Hah I forgot about arrays. Thanks for reminding me :) I blame the clock, I live in GMT+2 so it's 5am here.
Jan 11 '10 at 03:17 AM
Wizeon
(comments are locked)
|
|
if you really want dynamic names you can use a dictionary and then add keys with dynamic names with their values. use arrays because they are the fastest solution. if you need to access array elements much and need to search much in the array just use dictionaries.
(comments are locked)
|
