Search Unity

Feedback Include reference to the Scene in NavMesh.asset files ?

Discussion in 'Works In Progress - Archive' started by ShadoX, Jan 24, 2021.

  1. ShadoX

    ShadoX

    Joined:
    Aug 25, 2010
    Posts:
    260
    Hi there,

    This might not be the most useful suggestion, but I noticed a potential issue with NavMesh.asset files while working on some NavMesh related things.

    When you bake a NavMesh it creates a file called "NavMesh.asset" in a folder that has the same name as the Scene it's for. This is a decent way of organizing files, but a problem I came across was that you can move those NavMesh.asset files around and they will still work for the Scene they were created for...

    Meaning that regardless of their location in the project, they still affect the Scene they belong to. Which is nice in a way, because we don't have to stick to the built in file organization that way, but the problem is that if you'd take all your NavMesh.asset files and place them in the same folder or just use the Search option in the Project window, you get all NavMesh.asset files, but no way of knowing what scene they're for.. as they contain no references to the Scene they belong to.. at least no visible ones in the Inspector when you select a NavMesh.asset file

    I would suggest to set the name of the generated NavMesh file to the name of the Scene it's for or ideally include a field with a reference to the Scene the NavMesh.asset file is for, so that we can see it in the Inspector when having 1 selected

    I know it's a very minor issue, but if the NavMesh file can be created in a folder that is named after the Scene then it shouldn't be an issue to name the NavMesh file itself after the Scene as well
     
unityunity