- Home /
Fill An Array Slot By Slot (C#)
I Am Working On An Inventory Script, And Need It So I Can Fill Each Slot In The Array One At A Time, So They Dont Overwrite Eachother, And They Keep There Own Values(Its An Int Array).
Thanks In Advance!
Answer by Jamora · Oct 03, 2013 at 09:23 PM
The answer is: a for loop. Alternatively, a while loop, but that could crash your computer if you're not careful.
Trust $$anonymous$$e I $$anonymous$$now How Dangerous While Loops Are, Ive Learned The Hard Way(Crashed Unity 3 Times) And Also, I Need It To Fill One Array Slot On A GUI Button Press, And Im Not Sure If This Could Do That
Based on inductive reasoning; if you can do it once, you can do it forever. For loops are great for everything. Just remember to keep them in their cages... you don't want them running wild in your computer.
Your answer
Follow this Question
Related Questions
How could I make an array of Rects in C Sharp? 1 Answer
C4D texture projection 1 Answer
AntiAliasing On Offヾ(・・*) 0 Answers
Make Texture Power of 2 at rumtime 1 Answer
How to texture a mesh with multiple satellite pictures 0 Answers