Reply To: How to use NavMesh.CalculatePath()?

FlowCanvas Forums Support How to use NavMesh.CalculatePath()? Reply To: How to use NavMesh.CalculatePath()?

#3201
ruffleneck
Participant

Okay, problem solved. I think there’s a minor gripe with FlowCanvas with the NavMeshPath (NOT NavMeshAgent’s NavMeshPath, but NavMesh’s path) and it’s that it loses the initialization of the variable when you enter playmode.

Here you can see the test flowscript outside playmode; Look at top right, the path variable is initialized

Screenshot-2021-12-30-16.04.26

Here’s when you press play, and it fails to create the path; Look at top right, the path variable becomes uninitialized variable

Screenshot-2021-12-30-16.04.42

And how to get it work; You have to initialize it manually on enable; Look at top right, the myList (Vector3) is populated and the switch condition succeed

Screenshot-2021-12-30-16.07.45

Attachments:
  1. Screenshot-2021-12-30-16.04.26.png

  2. Screenshot-2021-12-30-16.04.42.png

  3. Screenshot-2021-12-30-16.07.45.png