unity do while code example
Example 1: for loop unity
for (int i = 0; i < 50; i++)
{
//Do something 50 times
}
Example 2: unity while loop
//you can do:
int count = 0;
while(count < 10)
{
print("This text will run 10 times!!!, this is: " + count);
}
//for infinite loop (use update instead)
while(true)
{
print("Spam");
}