playMaker

Author Topic: IntAsEnum attribute  (Read 2851 times)

Amimoller

  • Playmaker Newbie
  • *
  • Posts: 9
IntAsEnum attribute
« on: June 06, 2013, 03: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: 15500
  • Official Playmaker Support
Re: IntAsEnum attribute
« Reply #1 on: June 06, 2013, 05: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