Skip to content

[Guide] Fix for Invisible NavMesh/Bake Failure in Unity 2022.3 LTS #245

@Phuangji

Description

@Phuangji

Environment:

  • Unity Version: 2022.3.x LTS
  • NavMeshPlus Version: Latest (Git Clone / Assets install)
  • Official Package Dependency: AI Navigation 1.1.5 or newer

Description:

If you are using Unity 2022.3+, the official "AI Navigation" package changes how the NavMesh backend works. Many users might find that clicking "Bake" results in an empty NavMesh or the blue visualization (Gizmos) doesn't appear at all, even if FlagAsInSelectionHierarchy is fixed.

Key Solutions & Correct Workflow:

1. Pre-requisite: Create a NavMeshAgent FIRST

In Unity 2022.3, the Navigation Surface might fail to bake or visualize properly if there are no defined "Agent Types" or active Agents in the scene.

  • Action: Create a dummy Sprite/GameObject and add a Nav Mesh Agent component to it BEFORE you hit the Bake button on your Surface. This ensures the Navigation system initializes the Agent Type settings correctly.

2. Component Naming Confusion (UI Update)

The original NavMeshPlus tutorials/Wikis often refer to components as NavMeshSurface or NavMeshCollectSources2d. However, in Unity 2022.3 with the new AI Navigation package, the component names in the Add Component menu have shifted.
Please use the following mapping:

  • Tutorial figure says NavMeshSurface -> Use Navigation Surface
  • Tutorial figure says NavMeshCollectSources2d -> Use Navigation CollectSources2d
  • Tutorial figure says NavMeshModifier -> Use Navigation Modifier

Note: The components starting with "Navigation..." are the 2D-optimized versions provided by NavMeshPlus. Avoid using the ones starting with "NavMesh..." as they are the 3D-default versions.

3. Step-by-Step for Unity 2022.3:

  1. Install the official AI Navigation package from Package Manager.
  2. Create a Player/NPC and add the NavMesh Agent component.
  3. Create a NavMesh_Manager empty object.
  4. Add Navigation Surface (NOT NavMeshSurface).
  5. Add Navigation CollectSources2d.
  6. Change Use Geometry to Physics Colliders.
  7. Click Rotate Surface to XY (Transform rotation should be -90 on X).
  8. Tag your Map/Obstacles with Navigation Modifier.
  9. Click Bake. You should now see the blue NavMesh clearly in the Scene view.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions