Unity Learn home
View Tutorial Content

Working with Switch Statements

Tutorial
Beginner
+10 XP
20 Mins
(70)
Overview
Summary
In the same family as if and else, switch is a conditional statement. Just as a railroad switch guides a train to one of a number of possible tracks, a switch statement routes the flow of code to one of a number of possible code blocks. In this tutorial, you will learn about Switch Statements and how to use then in Unity.
Select your Unity version
Last updated: October 13, 2020
2019.4
2019.3
2019.2
2019.1
2018.4
2018.3
2018.2
2018.1
2017.4
2017.3
2017.2
2017.1
5.x
4.x
Language
English
Working with Switch Statements