-
I tried the example of sealed class for states in concurrently running multiple state machines. They are (shortly living) running separately in own coroutine context. But if I run them concurrently it seems that e.g. the YellowState will have defined multiple SwitchEvent transitions (until one of state machines is destroyed), right? When processing event in such state machine, I get |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I don't recommend using Events are immutable and are not tied to StateMachine, so you can use them whatever you need. |
Beta Was this translation helpful? Give feedback.
I don't recommend using
object
states in multithreading context. Use separate state instances. I suppose this will help.Events are immutable and are not tied to StateMachine, so you can use them whatever you need.