Trying to do this (set obj rotation for which side of a cube is facing forward) :
case "b": case "h": case "n": case "t": case "z":
x = 270.0; y = 180.0; z = 0.0;
break;
case "f": case "l": case "r": case "x": {
x = 90.0; y = 180.0; z = 180.0;
break;
but Unity can’t handle that. I really don’t want 26 “if” statements; “in” doesn’t seem to work…
What is “the Unity Way” for such selections, where multiple conditions produce the same result?
var foo = "a";
switch (foo) {
case "a":; case "b":; case "c":
print ("One");
break;
case "d":; case "e":; case "f":
print ("Two");
break;
default:
print ("None");
}