Calling method with enum parameters from buttons

Calling method with enum parameters from buttons

I have the following enum:
public enum WeaponType { Sword, Spear, Blunt, Ranged }

And I have the following public methods on a component:
public void MyMethod1(int myparam) { ... }
public void MyMethod2(WeaponType myparam) { ... }

Why is it that when I try to call my methods from a Button component, I can not see the ones that use enumerations as parameters?

Solutions/Answers:

Answer 1:

As Draco18s stated in comments, sadly, you can’t.

Thankfully, if it helps, you can still just cast it back and forth:

EMyEnum myEmum = (EMyEnum)myInt;

// Or.
int myInt = (int)myEnum;

References