Answers for "while loops Unity"

C#
5

for loop unity

for (int i = 0; i < 50; i++)
{
	//Do something 50 times
}
Posted by: Guest on June-17-2020
1

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"); 
}
Posted by: Guest on April-22-2021

C# Answers by Framework

Browse Popular Code Answers by Language