string to enum unity code example
Example 1: unity parse string to enum
YourEnumType parsed_enum = (YourEnumType)System.Enum.Parse( typeof(YourEnumType), your_string );
Example 2: unity parse string to enum
YourEnumType yourEnum = (YourEnumType) System.Enum.Parse (typeof (YourEnumType), yourString);