Skip to content

EnumFieldItem has ArgumentException #12

@kairipton

Description

@kairipton

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions