NavMeshAgent.isStopped == false does not resume movement

Hi everyone!

I need to do simple thing: When something happens my object need to stop moving. So i make NavMeshAgent.isStopped = true. This code is in update method.

                    NavAgent.isStopped = true;
                    easyAnimator.SetBooleanTrue("isJumpAttacking");
                    if (startJumping)
                    {
                        NavAgent.isStopped = false;
                        NavAgent.SetDestination(Vector3.zero);
                        startJumping = false;
                    }

After it’s stopped it fires animation and wait till flag startJumping is true. After i want to start movement again with another path (Vector.zero is just a sample of such path). This does not work! What does work? This:

                    NavAgent.isStopped = true;
                    NavAgent.isStopped = false;
                    easyAnimator.SetBooleanTrue("isJumpAttacking");
                    if (startJumping)
                    {
                        NavAgent.SetDestination(Vector3.zero);
                        startJumping = false;
                    }

I have one question… why? xD

If this is directly in your update function you are always setting NavAgent.isStopped = true. This means that it can never be false at it the next frame updates to true again.