unity how to get a random value out of an enum code example
Example: unity get random enum value
public enum CardSuit { Spades, Hearts, Diamonds, Clubs } void Start () { cardSuit = (CardSuit)Random.Range(0, 3); // or // cardSuit = (CardSuit)Enum.ToObject(typeof(CardSuit) , Random.Range(0, 3)); }