Answers for "unity switch case input"

C#
1

unity switch

public float number;

switch(number)
{
case 1: 
Debug.Log("1");
break;
case 2:
Debug.Log("1");
break;
default: //case that happens if no case matches
Debug.Log("I dont know");
break;
}
Posted by: Guest on February-03-2021

C# Answers by Framework

Browse Popular Code Answers by Language