Hi,
In a custom action I'm writing, a callback will be triggered with a custom event type provided by my internal code. For example, callback(MyEventType.ThisHappened).
Depending on this event type, I would like to trigger different FsmEvents, that would have to be defined in an array variable, as an action parameter... For example, { (MyEventType.ThisHappened, onThisHappened), (MyEventType.ThatHappened, onThatHappenedInstead) }
I tried using FsmArray, but I have only been able to make it work with simple Fsm* types; I understand it won't work with non-playmaker types because the variable types are not supported by the UI. But how about a custom class that contains only an FsmEnum and an FsmEvent, which are supported by the UI?
I would like to do something like this:
public class EventAssociation
{
[ObjectType(typeof(MyEventType))]
FsmEnum internalEventType;
FsmEvent matchingFsmEvent;
}
[ArrayEditorAttribute(typeof(EventAssociation))]
public FsmArray callbackEvents;
Is there any way to make this work within the playmaker action?