[BUG]: Heavy Containment Zone meshes are not readable (NavMesh cannot be baked)
Before You Report
- [x] I have searched for existing reports of this bug, and this bug report is unique.
Version
1.1.0
Description
I'm using NavMeshComponents, trying to bake a NavMesh for NPC navigation, but HCZ cannot be baked, as the meshes cannot be read.
To fix: go to mesh import settings for the HCZ meshes (and maybe GR18 and PT00 because they don't work either I'm pretty sure) and make sure that "Read/Write" is set to True
To Reproduce
Import scripts from NavMeshComponents from Unity Technologies: https://github.com/Unity-Technologies/NavMeshComponents
Run this function:
public static void BuildNavMesh()
{
if (NavMeshSurface != null)
{
NavMeshSurface.RemoveData();
Object.Destroy(NavMeshSurface.gameObject);
}
NavMeshSurface = new GameObject("NavMesh").AddComponent<NavMeshSurface>();
NavMeshBuildSettings settings = NavMeshSurface.GetBuildSettings();
settings.agentClimb = 0.21f;
settings.agentHeight = 0.83f;
settings.agentSlope = 45f;
settings.agentRadius = 0.25f;
NavMeshSurface.useGeometry = NavMeshCollectGeometry.PhysicsColliders;
NavMeshSurface.collectObjects = CollectObjects.All;
NavMeshSurface.layerMask = NavMeshLayers;
NavMeshSurface.overrideVoxelSize = true;
NavMeshSurface.voxelSize = 0.05f;
NavMeshSurface.overrideTileSize = true;
NavMeshSurface.tileSize = 128;
NavMeshSurface.BuildNavMesh();
Logger.Info("NavMesh Built! ");
}
Check the logs to see if the error occurs. Do note: UnityEditor might have different behavior than the actual runtime.
Expected Behavior
NavMesh bakes as usual, pathfinding is available to be used in HCZ.
Additional Information
navmesh is epic and I have no clue how it was managed to make it not bake