Can you use switch-case with an enum in Unity? If so, how do you format the conditional check?
FYI, the snippet below does NOT work (with ""'s around the conditional check, I get the cannot == error, as the enum is not a string) . As it is, I get the unknown identifier error.
enum choices{ APPLE, banana, canaple } function Start(){ var choice:choices=APPLE; switch(choice){ case APPLE: Debug.Log("APPLE"); break; case banana: Debug.Log("B"); break; case canaple: Debug.Log("CC"); break; default: Debug.Log("nothing"); break; } }