playMaker

Author Topic: Custom Drawer attribute in State/Action editor? (ObjectPropertyDrawer help)  (Read 3231 times)

Andy22

  • Junior Playmaker
  • **
  • Posts: 99
Hi,

i just looked into the ObjectPropertyDrawer and assumed it can be used to change the way a field is drawn for a action inside the state tab? Now while trying to use this system, i noticed it only changes the way "FsmObject" variables are drawn in the "Variables" tab and the exposed inspector view?

Is this a bug or cant u hook into the way a action member is drawn inside the "state" tab?

I tried to finally add a enum mask and custom Event attribute/PropertyDrawer, but the default unity Drawer is ignored/not used for the actions and the ObjectPropertyDrawer is only used for type FsmObject.

So is there a way to customize the action field rendering, without creating a special custom editor for the whole action? I'm looking for something like the default unity PropertyDrawer's that work with attributes on a per field basis, not per action?

Can i somehow hook, add new "UIHints" attributes to PM or write my own attribute similar to the "HasFloatSlider"?

thx Andy
« Last Edit: December 12, 2013, 07:32:01 AM by Andy22 »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Hi,

 I don't think you can, but I guess that some c# guru could find its way in there and extend it the way you want. I would ask on c# forums on how to do this actually.

bye,

 Jean

Jake

  • Junior Playmaker
  • **
  • Posts: 61
    • Fluffy Underware
Any news on this? I wonder why PM doesn't respect PropertyDrawers except it's own like Tooltip etc...this is a big downside.

I have some major logic implemented with PropertyDrawers and I'd like to give my PM users the same benefits as my non-PM users.

Alex, is there a special reason why you don't use PropertyField() internally?

Thanks

Jake


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Hi,

 do you have a specific use case, maybe if you give some class or context about what you are trying to achieve, I can provie you with a possible attempt.

 Bye,

 Jean