playMaker

Author Topic: How to make Custom UIHintAttribute?  (Read 1537 times)

xunxun

  • Junior Playmaker
  • **
  • Posts: 53
How to make Custom UIHintAttribute?
« on: May 13, 2014, 04:27:00 AM »
I want to make a custom action that can have a list of Custom Hints Like drop down list.

something like
Code: [Select]
//...
[UIHint(UIHintAttribute.IsDefined)]
FsmString [] myList;

public override void Reset()
{
myList = new FsmString[2]
myList[0] = "Apple";
myList[1] = "PlayMaker";


}
// Code that runs on entering the state.
public override void OnEnter()
{
// do what has been chosen
}

   

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to make Custom UIHintAttribute?
« Reply #1 on: May 14, 2014, 12:29:08 AM »
Hi,

 Have you studied custom editors for PlayMaker? your custom UIHint would be possible only if you actually implement the custom editor that goes with this action.

Also, arrays are coming for the next release of Playmayker, so you may want to wait a bit and it's going to be built in :)

Meanwhile, I would strongly recommand using ArrayMaker, you'll likely get more flexibility in general with this.

 Bye,

 Jean