onEntry

fun onEntry(block: StateAction.() -> Unit)(source)

Run block when this state is entered, before any triggers are installed for the state. For composite states, entry runs the parent's actions first, then descends into the initial substate (whose entry actions then run).