Search Unity

Save scene's navmesh in editor

Discussion in 'Navigation' started by joshcamas, Mar 19, 2018.

  1. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,278
    Hello friends :)

    I am currently writing a batch program that goes through all of my scenes and does a whole bunch o' things, including building the navmesh.

    So currently I collect sources (NavMeshBuilder.CollectSources), build the data, (BuildNavMeshData) and update it (UpdateNavMeshDataAsync).

    However, I was unsurprised when it did not save to the scene, since I'm sure that must be handled another way. How is this done? I'm assuming I have to save the data to an asset, (Or replace an already existing asset) but then how do I reference this asset to the scene?

    I also figured maybe I could use NavMeshBuilder.BuildNavMeshForMultipleScenes and only plug in one scene, but it looks like it's not accessible for me, possibly cause I'm still using 2017.1 at the moment.

    Thanks!

    EDIT: Wow, Navmesh documentation seems incredibly thin for some reason. Anyways, it almost looks like there is no built in way to have multiple scenes with their own navmesh? It's quite unclear. If so, then I guess I will have to build my own Navmesh data loader, which shouldn't be *too* hard...

    Josh
     
    Last edited: Mar 19, 2018