06-18-2024 12:44 PM - edited 06-18-2024 12:45 PM
The state actor template shipping with State Actor launches a UI actor, which launches a nested idle state actor.
What happens if I launch a UI in idle's actor core? Will this launch a UI everytime I switch state from running to idle?
I am asking because I find it sometimes more natural if the model launches its UI.
Solved! Go to Solution.
06-18-2024 02:44 PM
You only ever launch one actor core, regardless of the number of states you have. When I have used the state pattern actor, that actor core has belonged to the immediate child of State Actor (which I typically refer to as the "context"). That actor core runs exactly once, for the life of the state actor, so you could launch a nested actor from there.
In the example, Process State is the context actor. It has an actor core, which actually does launch a nested actor - Process Actor. Idle and Running do not have actor core overrides. Launching either Idle or Running will start Process State:Actor Core, which will launch Process Actor.
06-20-2024 01:37 PM
@justACS wrote:
You only ever launch one actor core, regardless of the number of states you have.
This was not obvious to me, but it makes complete sense.