Hi.
There is a problem with the EnumFieldItem that comes out when using Inspect ().
The EnumFieldItem script only uses the KeyCode.
So I am using the value property and Init method after modifying it.
public override object value
{
get
{
//return Convert.ChangeType( Enum.Parse( typeof(KeyCode),dropdown.captionText.text), typeof(KeyCode) );
return Convert.ChangeType( Enum.Parse( preValue.GetType(),dropdown.captionText.text), preValue.GetType() );
}
protected set
{
.....
}
}
Hi. There is a problem with the EnumFieldItem that comes out when using Inspect (). The EnumFieldItem script only uses the KeyCode. So I am using the value property and Init method after modifying it.
public override object value { get { //return Convert.ChangeType( Enum.Parse( typeof(KeyCode),dropdown.captionText.text), typeof(KeyCode) ); return Convert.ChangeType( Enum.Parse( preValue.GetType(),dropdown.captionText.text), preValue.GetType() ); } protected set { ..... } }
void Init() { //fieldType = typeof(KeyCode); var currentValue = componentType.GetField(fieldName).GetValue(component); fieldType = currentValue.GetType(); }
I hope to fix this in a later version. Thank you.