Uploaded May 2023 | Updated September 2026, 1 hour ago
In this video you will learn how you can generate a Mesh at runtime based on the NavMesh Triangulation.
This can be used for debugging purposes or some cool ground-based shader effects. You will learn how to show the Navigation Mesh per agent type with the NavMeshSurface component from the Navigation Components as well as show different materials per area.
As of the Navigation Components 1.1.3, NavMesh.CalculateTriangulation() does not properly generate NavMeshTriangulation.areas per Navigation Area. Showing navigation areas therefore only works if you build using the legacy system, which does not support different navigation meshes per NavMeshAgent type.
🔶 ALL THINGS LlamAcademy now available at: https://llamacademy.dev/support including latest tutorials, courses, ways to support, and more! Check it out 🙂
👨💻 Get the FULL FREE PROJECT on GitHub: github.com/llamacademy/ai-series-part-45
🏷️Save 25% on the ultimate C# IDE: JetBrains Rider with code LLAMACADEMY: jetbrains.com/store/?section=personal&billing=yearly
📚 Resources:
🟠 URP Fading Objects In/Out: youtu.be/vmLIy62Gsnk
🟠 Built In Render Pipeline Fading Objects In/Out: youtu.be/dIC4wbUgt5M
🟠 Navigation Components: docs.unity3d.com/Packages/com.unity.ai.navigation@1.1/manual/index.html
🟠 NavMeshTriangulation: docs.unity3d.com/ScriptReference/AI.NavMesh.CalculateTriangulation.html
🟠 NavMeshSurface: docs.unity3d.com/Packages/com.unity.ai.navigation@1.1/api/Unity.AI.Navigation.NavMeshSurface.html
Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.
Chapters:
00:00 Topic Introduction & What You'll Learn
01:40 Scene Overview
02:16 Generate a Mesh from a NavMesh - NavMeshVisualizer.cs
03:57 Demo NavMeshVisualizer & Areas for Improvement
04:59 Multi NavMesh Generation - MultiNavMeshVisualizer.cs
06:26 Demo MultiNavMeshVisualizer
07:07 Supporting Navigation Areas - MultiNavMeshVisualizer.cs
11:00 Why doesn't it work? A Unity Bug, and a Solution
12:09 Closing Thoughts & Support LlamAcademy
In this video you will learn how you can generate a Mesh at runtime based on the NavMesh Triangulation.
This can be used for debugging purposes or some cool ground-based shader effects. You will learn how to show the Navigation Mesh per agent type with the NavMeshSurface component from the Navigation Components as well as show different materials per area.
As of the Navigation Components 1.1.3, NavMesh.CalculateTriangulation() does not properly generate NavMeshTriangulation.areas per Navigation Area. Showing navigation areas therefore only works if you build using the legacy system, which does not support different navigation meshes per NavMeshAgent type.
🔶 ALL THINGS LlamAcademy now available at: https://llamacademy.dev/support including latest tutorials, courses, ways to support, and more! Check it out 🙂
👨💻 Get the FULL FREE PROJECT on GitHub: github.com/llamacademy/ai-series-part-45
🏷️Save 25% on the ultimate C# IDE: JetBrains Rider with code LLAMACADEMY: jetbrains.com/store/?section=personal&billing=yearly
📚 Resources:
🟠 URP Fading Objects In/Out: youtu.be/vmLIy62Gsnk
🟠 Built In Render Pipeline Fading Objects In/Out: youtu.be/dIC4wbUgt5M
🟠 Navigation Components: docs.unity3d.com/Packages/com.unity.ai.navigation@1.1/manual/index.html
🟠 NavMeshTriangulation: docs.unity3d.com/ScriptReference/AI.NavMesh.CalculateTriangulation.html
🟠 NavMeshSurface: docs.unity3d.com/Packages/com.unity.ai.navigation@1.1/api/Unity.AI.Navigation.NavMeshSurface.html
Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.
Chapters:
00:00 Topic Introduction & What You'll Learn
01:40 Scene Overview
02:16 Generate a Mesh from a NavMesh - NavMeshVisualizer.cs
03:57 Demo NavMeshVisualizer & Areas for Improvement
04:59 Multi NavMesh Generation - MultiNavMeshVisualizer.cs
06:26 Demo MultiNavMeshVisualizer
07:07 Supporting Navigation Areas - MultiNavMeshVisualizer.cs
11:00 Why doesn't it work? A Unity Bug, and a Solution
12:09 Closing Thoughts & Support LlamAcademy