Unity Learn home
View Tutorial Content

Ternary Operator

Tutorial
Intermediate
+10 XP
5 Mins
(12)
Overview
Groups
Summary
How to utilize the Ternary Operator to build simple, shorthand IF-ELSE logical conditions.
Select your Unity version
Last updated: October 31, 2022
2021.3
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
Also included in
Unity Pro
The complete solution for professionals to create, operate and monetize.
Ternary Operator