삼항 연산자 A = 조건문 ? : 참일때 : 거짓일때 예시 코드 using UnityEngine; public class TernaryOperatorExample : MonoBehaviour { private int health = 70; void Start() { // 만약 health가 50보다 크면 "건강한 상태"를 출력하고, // 그렇지 않으면 "위험한 상태"를 출력합니다. string healthStatus = (health > 50) ?
"건강한 상태" : "위험한 상태"; Debug.Log(healthStatus); } } 예시 코드 2 using UnityEngine; public class TernaryOperatorExample : MonoBehaviour { private bool i.....