|
using UnityEngine;
|
|
|
|
namespace PhxhSDK
|
|
{
|
|
public partial class Utils
|
|
{
|
|
public static T GetRandomEnum<T>() where T : System.Enum
|
|
{
|
|
T[] values = (T[])System.Enum.GetValues(typeof(T));
|
|
int randomIndex = Random.Range(0, values.Length);
|
|
|
|
return values[randomIndex];
|
|
}
|
|
}
|
|
} |