Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

navigation on terrain

Discussion in 'Navigation' started by icefreedom, Mar 9, 2019.

  1. icefreedom

    icefreedom

    Joined:
    Jun 11, 2018
    Posts:
    9
    Hi
    I have two prefabs
    TerrainA
    TerrainB

    Player can chose which terrain he wants and terrain prefab is initialize on scene
    But i need to bake navigation on new terrain on runtime.
    If user chose terrainB he gets new terrain but navmesh for terrainA. as its shown on screenshot.
    Is there a way how to solve it?
     

    Attached Files:

  2. icefreedom

    icefreedom

    Joined:
    Jun 11, 2018
    Posts:
    9
    ok i have it.
    1- download NavMeshComponents
    2- open example project and export NavMeshComponents as package
    3- import that package to your project
    (if you simply copy that files you will get lots of errors)
    4- add to your terrain component "Nav mesh Surface"
    5- bake that component
    6- save that terrain as new prefab

    btw thank you for those NavMeshComponents Unity.