Visualize a NavMesh, In Game! | AI Series 45




Published: 30 May 2023

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: https://github.com/llamacademy/ai-series-part-45

🏷️Save 25% on the ultimate C# IDE: JetBrains Rider with code LLAMACADEMY: https://www.jetbrains.com/store/?section=personal&billing=yearly


📚 Resources:

🟠 URP Fading Objects In/Out: https://youtu.be/vmLIy62Gsnk

🟠 Built In Render Pipeline Fading Objects In/Out: https://youtu.be/dIC4wbUgt5M

🟠 Navigation Components: https://docs.unity3d.com/Packages/[email protected]/manual/index.html

🟠 NavMeshTriangulation: https://docs.unity3d.com/ScriptReference/AI.NavMesh.CalculateTriangulation.html

🟠 NavMeshSurface: https://docs.unity3d.com/Packages/[email protected]/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.


Connect on Social Media

Some links may be affiliate links, which at no additional cost to you, gives LlamAcademy a small portion of the purchase.