Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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;
}
Source by w3programmers.org #
 
PREVIOUS NEXT
Tagged: #unity #switch
ADD COMMENT
Topic
Name
1+5 =