0

I want to use NavMesh.SamplePosition to find a point on NavMesh in order to instantiate game object. The code works with no bug for several months. But the function will go into infinite and freeze the game and also editor recently. Unity Editor freezes like going into infinite loop and Visual Studio finds out the task is stuck on NavMesh.SamplePosition. hit.position is a infinity vector so I guess the function is not started to find the position yet. As NavMesh.SamplePosition will return false if no position is found, I don't think it caused by the bad position or searching radius.

The line freezing the editor

Jacky Hon
  • 151
  • 12

0 Answers0