Skip to content

Instantly share code, notes, and snippets.

@druggedhippo
druggedhippo / NavMeshGenA.cs
Last active December 3, 2024 19:53
Unity Navigation mesh by terrain texture
/****
NOTE NOTE NOTE
1. Add this component to a terrain
2. Set your area ID's to be what you want the agent to think each surface in your terrain is (eg, Grass, Path), in the same order as the textures assigned in the terrain textures
3. Set "Defaultarea" to be whatever texture you expect to be the "most" common terrain texture. Generall this will be the first texture you assigned in step 1, eg "Grass"
IF THIS IS STILL TO SLOW: