Enum extensions - Team-Swamp/IceBites GitHub Wiki
This is a static class that improve the usage of enum with custom attributes.
Write by - Bas
Every method it public.
Methods | Return | Description |
---|---|---|
GetString(Enum) |
string |
Get the string of an enum type. If not existing returns empty string |
GetChar(Enum) |
char |
Get the char of an enum type. If not existing returns empty char ('\0') |
GetVector2(Enum) |
Vector2 |
Get the Vector2 of an enum type. If not existing returns vector2.zero |
GetVector3(Enum) |
Vector3 |
Get the Vector3 of an enum type. If not existing returns vector3.zero |
GetRandomEnumValue |
T |
Retrieves a random enum value of the specified type. Returns a random enum value of type T |
Vector3 use case
Vector 3 attributes
Enum with Vector3
Using the enums Vector3