コード例 #1
0
 /// <summary> Select a random element index from the set. </summary>
 public static int FirstRandomIndex <T>(this ReadOnlySet <T> set)
 => UnityEngine.Random.Range(0, set.Count);
コード例 #2
0
 /// <summary> Select a random element from the set. </summary>
 public static T FirstRandom <T>(this ReadOnlySet <T> set)
 => set.ElementAtOrDefault(FirstRandomIndex(set));