Hello,
Such conversion is not directly supported. You will need to implement it as a switch-case statement handling in it all the possible enum-values and convert them individually to strings. For example:
var SomeUnit::Fruit enum_value = ...
var string enum_str = "";
switch ( enum_value )
{
case SomeUnit::Fruit.Apple : enum_str = "Apple";
case SomeUnit::Fruit.Banana : enum_str = "Banana";
...
}
trace enum_str;
In the case the enum items are numbered consecutively, you can convert the enum value into an integer and use the integer as selector to select a string from an array of strings. For example by using a locally defined array:
array string fruits[4];
fruits[0] = "Apple";
fruits[1] = "Banana";
...
var SomeUnit::Fruit enum_value = ...
var string enum_str;
enum_str = fruits[(int32)enum_value ];
For optimization purpose, you can manage the array as a member existing within a class. See array member.
I hope it helps you further.
Best regards
Paul Banach