Search Unity

How to execute script upon sub state machine enter?

Discussion in 'Animation' started by DamKay, Oct 11, 2019.

  1. DamKay

    DamKay

    Joined:
    Aug 18, 2019
    Posts:
    10
    How do i execute a script only once when entering a specific sub state machine?
    A StateMachineBehaviour on the sub state machine will clone itself to every state inside it in runtime,
    so i cannot use the OnStateEnter function.

    Any suggestions?