Search Unity

Re-baking navigations by script???

Discussion in 'Scripting' started by EnsurdFrndship, Jun 15, 2016.

  1. EnsurdFrndship

    EnsurdFrndship

    Joined:
    Apr 17, 2010
    Posts:
    786
    Hello,
    I am developing a game to where a room that has 4 walls with an open doorway on each wall gets instantiated and placed together side by side in a 3 dimensional grid (making it look like my game has endless rooms). I made my floor into a static object and baked a navigation system.

    The problem I am having is that when the rooms instantiate, I can not 'instantiate' the navigation system along WITH it (for the multiple rooms), BUT, I was hoping there was SOME way to code a 're-bake' for my navigation system. Something like...

    Navigation.Bake();

    after my rooms get instantiated. Is there a way to 're-bake' everything during runtime?

    Thank you.
     
  2. BubyMB

    BubyMB

    Joined:
    Jun 6, 2016
    Posts:
    140
    I am fairly sure nav baking can Only be done manually.
     
  3. listener

    listener

    Joined:
    Apr 2, 2012
    Posts:
    187
    I think not yet with Unity3Ds system, you could write your own or use some AStar solution from store, but it is in the road map https://unity3d.com/unity/roadmap
     
    LeftyRighty likes this.
  4. EnsurdFrndship

    EnsurdFrndship

    Joined:
    Apr 17, 2010
    Posts:
    786
    If they have Nav Mesh Obsticles, wouldn't it be a neat idea to invent an inverted Nav Mesh Obsticle at least (where it 'undoes' or 'cancels out' the Nav Mesh Obsticle)?