playMaker

Author Topic: IntAsEnum attribute  (Read 739 times)

Amimoller

  • Playmaker Newbie
  • *
  • Posts: 9
    • View Profile
IntAsEnum attribute
« on: June 06, 2013, 12:09:05 AM »
Since there is no FsmEnum, could we instead have an attribute to show an int as an enum e.g.

[IntAsEnum(typeof(MyEnum))]
public FsmInt myIntValue;

This would show a dropdown with all the enum values, while still being able make it a variable.

Cheers

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: IntAsEnum attribute
« Reply #1 on: June 06, 2013, 02:24:09 AM »
Hi,

 it's been requested already :) the lack of enum support is definitly an issue in may scenarios.

the problem here is that enum do not always translate to ints, some are bytes, some are custom, etc etc, so I think it's difficult to find the right way to do it.

Bye,

 Jean