Search Unity

Hide NavMesh Agent Properties in Insector

Discussion in 'Navigation' started by BloatedNikNak, Nov 30, 2018.

  1. BloatedNikNak

    BloatedNikNak

    Joined:
    Dec 6, 2017
    Posts:
    1
    I'm using a NavMesh Agent, but the variables ie. speed etc are set in code, as these change depending on the situation.

    I realize that i need to have this component on the game object, but I do not want these values to be overridden in the Inspector. Is it possible to protect against this, or possible to hide these values?

     
  2. Yandalf

    Yandalf

    Joined:
    Feb 11, 2014
    Posts:
    491
    This is more of an editor coding problem, I suggest taking your issue there since those forums are more lively.
    That said, topf of my head I don't think it's possible to override the inspector in this case because the built-in inspector is already an override. If you'd write a new inspector (I suggest doing so only if you have the code for the original), you still need to find a way to tell Unity you want to use your new inspector instead of the built-in one.
    I'd honestly just make sure your prefabs don't get changed, definitely keep an eye on that if you're using version control.