Answers for "unity exclude number from random"

C#
1

unity exclude number from random

var validChoices = [1,3,5];
function GetRandom() : int
{
     return validChoices[Random.Range(0, validChoices.Length)];
}
Posted by: Guest on March-12-2021

C# Answers by Framework

Browse Popular Code Answers by Language