0

My game is running normally in the runtime editor. The problem occurs with the build result. seen in the Output Log that the agent (NavMeshAgent) was not created because it did not close enough to navmesh. whereas in the editor the problem did not arise. Next I attach a screenshot of my output log.

Output Log Output Log

Maybe someone knows why this happens? and what is the solution ??

irwnsyh
  • 23
  • 7
  • How are you placing your agent? is it relative to screen size, etc? – BugFinder Oct 01 '19 at 11:43
  • @BugFinder yes I already did that. I have even tried to move my NPC's position to suit Navmesh. I use this code 'public void IntializeAgent(){ NavMeshHit closestHit; Vector3 posisiAwal = this.transform.position; if (NavMesh.SamplePosition (posisiAwal, out closestHit, 10, 1)) { this.transform.position = closestHit.position; } }' – irwnsyh Oct 01 '19 at 11:47
  • and. its still error like that. – irwnsyh Oct 01 '19 at 11:49
  • perhaps because it already is "somewhere" and has thrown the navmesh error at that point – BugFinder Oct 01 '19 at 11:50
  • whether you use the code or not use it, it's still error. The problem is why the error is only when build, when playing in the editor everything runs smoothly – irwnsyh Oct 01 '19 at 11:58
  • because the conditions are different most likely.. such as screen size, screen scaling, timing, semi race condition where once built something happens in a different order.. – BugFinder Oct 01 '19 at 12:01

0 Answers0