@benedictfritz Enum.GetValues allocates, so caching it is ideal. If your enum is simple then I do ESS e = (ESS)Random.Range(0, (int)ESS.MAX)
-
-
-
@RileyLabrecque Oooo much better! Thanks! - 5 more replies
New conversation -
-
-
@Padraig I think the int cast should round it down to 0 a proportional number of times since Random.value is 0-1? Not 100%Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@Padraig Yeah, that's how C# does itThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.