At about 5 minutes into the video you define the Animator unitAnimator
to be a [SerializedField]
to be assigned through the editor.
Is there any reason not to use this?
private void Awake()
{
unitAnimator = GetComponentInChildren<Animator>();
}