Hello! Hope you are ok.
Got a question here regarding usage of multiple global events in the same FSM, here's my case:
In a game object I have a FSM with let's say 3 global events, but it could be any number. Each global event follows a unique path of states and actions, all paths ends in a idle state. This FSM is used as a manager for components in it's game object and it's children.
In another game object I have a script, in this script I have a function where I invoke the Manager's global events via code, one line after another, expecting the manager to receive each event, execute it's full set of states and finally land on the idle state.
However, it seems that when I call the first event and it starts doing its job, and then I call the second event it immediately "cancels" the first event path of execution, wherever it were, and starts executing the second event's path .
I know a FSM can only have one active state at a time and the events are being called one after another in a c# function, and I think this is the reason they are being "overriding", but, is there a way to prevent this? Like waiting for the paths to end and land in the idle state? Or should I approach this in a different way?
I'm using this to set some post processing effects, btw