docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    NavMesh Modifier component reference

    Use the NavMesh Modifier component to adjust the behavior of a GameObject when the NavMesh is baked at runtime. The NavMesh Modifier component affects the NavMesh during the generation process only. This means the NavMesh is updated to reflect any changes to NavMesh Modifier components when you bake the NavMesh. Use the available properties to specify changes in behavior and any limits to those changes.

    To use the NavMesh Modifier component, add it to a GameObject as follows:

    1. Select the GameObject whose effect on the NavMesh you want to modify.
    2. In the Inspector, select Add Component, then select Navigation > NavMesh Modifier.
      The NavMesh Modifier component is displayed in the Inspector window.

    The NavMesh Modifier can also affect the NavMesh generation process hierarchically. This means that the GameObject the component is attached to, as well as all its children, are affected. In addition, you can place another NavMesh Modifier further down the hierarchy to override the NavMesh Modifier that is further up the hierarchy.

    To apply the NavMesh Modifier hierarchically, select the Apply To Children property.

    Note: The NavMesh Modifier component replaces the legacy Navigation Static setting which you could enable from the Objects tab of the Navigation window and the Static flags dropdown on the GameObject. The NavMesh Modifier component is available for baking at runtime, whereas the Navigation Static flags were available in the Editor only.

    The following table describes the properties available in the NavMesh Modifier component.

    Property Description
    Mode Specify whether to consider or ignore the affected GameObject(s).
    Add or Modify Object Consider the affected GameObject(s) when building the NavMesh.
    Remove Object Ignore the affected object(s) when building the NavMesh for the specified agent type.
    Affected Agents Specify which agents the NavMesh Modifier affects. For example, you can choose to have certain obstacles be ignored by specific agents.
    All Modify the behavior of all agents.
    None Exclude all agents from the modified behavior.
    Apply to Children Apply the configuration to the child hierarchy of the GameObject.
    To override this component's influence further down the hierarchy, add another NavMesh Modifier component.
    Override Area Change the area type for the affected GameObject(s).
    If you want to change the area type, select the checkbox then select the new area type in the Area Type dropdown.
    If you do not want to change the area type, clear the checkbox.
    Area Type Select the new area type you want to apply from the dropdown.
    Override Generate Links Force the NavMesh bake process to either include or ignore the affected GameObject(s) when you generate links.
    Generate Links Specify whether or not to include the affected GameObject(s) when you generate links.
    To include the GameObject(s) when you generate links in the NavMesh bake process, select this checkbox.
    To ignore the GameObject(s) when you generate links in the NavMesh bake process, clear this checkbox.

    Additional resources

    • Create a NavMesh

    Did you find this page useful? Please give it a rating:

    Thanks for rating this page!

    Report a problem on this page

    What kind of problem would you like to report?

    • This page needs code samples
    • Code samples do not work
    • Information is missing
    • Information is incorrect
    • Information is unclear or confusing
    • There is a spelling/grammar error on this page
    • Something else

    Thanks for letting us know! This page has been marked for review based on your feedback.

    If you have time, you can provide more information to help us fix the problem faster.

    Provide more information

    You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:

    You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:

    You've told us there is information missing from this page. Please tell us more about what's missing:

    You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:

    You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:

    You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:

    You've told us this page has a problem. Please tell us more about what's wrong:

    Thank you for helping to make the Unity documentation better!

    Your feedback has been submitted as a ticket for our documentation team to review.

    We are not able to reply to every ticket submitted.

    In This Article
    • Additional resources
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)