NavMesh "GetRemainingDistance" Error

Hi!

I encountered an issue while trying to implement the Narrative Design Tutorial into my Unity project. After conversing with the avatar in the first section, it moves onto the next section but then does not stop moving and my game scene stops. It yields the error below. I have tried lowering the avatar as much as possible to ensure it is on the baked navmesh to no avail. Any assistance will be much appreciated. Thanks

Hello @ezewudokositoni,

Could you please double-click on this error and share the code with me?

Thanks for your response. Yes, I can.

Could you please update your while loop as follows?

while (navMeshAgent.enabled && navMeshAgent.isOnNavMesh && navMeshAgent.remainingDistance > navMeshAgent.stoppingDistance)

My apologies for the delay in response.

The code modification was the solution. Thanks!
Why was Unity not recognizing that the avatar is on the navmesh? Was that a problem on my end?

The NavMesh component was getting disabled, which is why we added those conditions to handle it properly.

Oh okay, got it. Thanks.