Search Unity

Bake NavMesh every frame

Discussion in 'Navigation' started by MikeyJY, Apr 12, 2020.

  1. MikeyJY

    MikeyJY

    Joined:
    Mar 2, 2018
    Posts:
    530
    Maybe I should post this on Navigation forum, but anyway. I searched a lot on YT and forums but I didn't find exactly what I want. Is there any way to bake the navmesh every frame to use for moving object like a boat?

    P.S: I need a solution without downloading the NavMesh old coponents(NavMeshSurface, etc.) Is it possible?
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yeah you should post this in navigation forum. I've moved it this time.
     
  3. MikeyJY

    MikeyJY

    Joined:
    Mar 2, 2018
    Posts:
    530
    Sorry but I thought that this thread has a scripting solution
     
  4. vhman

    vhman

    Joined:
    Aug 13, 2018
    Posts:
    359
    Hi, just download NavMeshSerface examples, there you will find bake every frame example, its called LocalNavMeshBuilder

    https://github.com/Unity-Technologi...ssets/Examples/Scripts/LocalNavMeshBuilder.cs