StateMachineBehaviour get component on awake ??

public class StateCheck : StateMachineBehaviour
{
Animator anim;

    private void Awake()
    {
        // anim = with this animator
    }
}

i need to get animator on awake, how can i do that ??

if the animator is already attached to the game object ur script is on there is no need to have on awake for this function, another way if the animator is not attached is to make the variable at the top
either [serilizable] or public.