Answers for "how to make % posibility to spawn an object in unity"

C#
1

how to make % posibility to spawn an object in unity

if(Random.value > 0.5) //%50 percent chance {//code here }  if(Random.value > 0.2) //%80 percent chance (1 - 0.2 is 0.8) { //code here }  if(Random.value > 0.7) //%30 percent chance (1 - 0.7 is 0.3) { //code here }
Posted by: Guest on March-29-2020

Code answers related to "how to make % posibility to spawn an object in unity"

C# Answers by Framework

Browse Popular Code Answers by Language