Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Andy22 on November 13, 2013, 08:55:00 AM
-
Hi,
Playmaker has no "FsmEnum" type, so whats the general method to expose/use a enum field for a custom action as a named fsm variable?
I also cant find/use my enum using the Object type, since a enum is not a "Unity.Object".
thx Andy
-
I'm not very code savvy so I don't have a direct answer, but check out the Vector3 Operator action, there is some enum stuff in there that you may be able to examine and deduce an answer from.
-
Hi,
Playmaker doesn't support enum this way unfortunatly.
The way to go is to compose a string base list of enum with the real enum, if you build a custom editor, then you can build something around that, but simply saving your enum selection either by its index or string ( index is very dangerou if you plan on adding more enum items, so prefer string)
What is the enum look like? can you give a bit of context?
Bye,
Jean
-
Ah i see, maybe u can add enum support later on. We use those all over the place and like i noted in my other thread, its not practically to create customs editors per enum/action.
We use enums for our event system, so u don't guess what event string to send or make errors writing it. So u just use "EventType.EventXY.ToString()". This also solves the problem to understand what events are actually "supported/available", since u can select/see them from a enum. We also ensure the same event names are used over several event systems this way, so u can easily send events across different systems. Than ofc its much more flexible than hardcode event string names.
So as i noted we have a ToggleLinked action, that can "Toggle", "ToggleOn", "ToggleOff" Linked objects, if they support those events. So ofc we would like to give the level-designer the ability to select what event to send to those linked objects, so we would like to expose those enums to the inspector, so the level-designer can change the setup easily, without needing to know what state to change/look.
We also use the same system to setup EventMask's, which basically allow multiple events to-be set in one drop-down field or do multiple data selections.
thx Andy
-
Hi,
Yes, I hope this will become supported too. FsmEnum would be very handy for sure!
bye,
Jean
-
+1 for ENUM support in Playmaker please 8)
-
+1 for FsmEnum
-
+1 for FsmEnum too! :P
-
Please, we really need this!
-
+1 for FsmEnum
-
I'll try to get this into the next update...
-
+ 1 for FsmEnum. This is so handy!
I'll try to get this into the next update...