unity c# string to enum 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);