Code pattern for isStopped

I’m talking about this one :slight_smile:

navMeshAgent.isStopped = false;
    }

    public void Stop()
    {
        navMeshAgent.isStopped = true;
    }

I see this code pattern repeated a lot in the course. Is this just a good way to check if the code is flowing correctly? A kind of system of checks and balances?

No, this simply tells the NavMeshAgent to stop moving or start moving depending on the value you assigned to navMeshAgent.isStopped…

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms