diff --git a/src/DotRecast.Recast.Toolset/Geom/DemoDtTileCacheMeshProcess.cs b/src/DotRecast.Recast.Toolset/Geom/DemoDtTileCacheMeshProcess.cs index 87818d1..619a5b0 100644 --- a/src/DotRecast.Recast.Toolset/Geom/DemoDtTileCacheMeshProcess.cs +++ b/src/DotRecast.Recast.Toolset/Geom/DemoDtTileCacheMeshProcess.cs @@ -46,13 +46,13 @@ namespace DotRecast.Recast.Toolset.Geom if (null != _geom) { var offMeshConnections = _geom.GetOffMeshConnections(); + option.offMeshConCount = offMeshConnections.Count; option.offMeshConVerts = new float[option.offMeshConCount * 6]; option.offMeshConRad = new float[option.offMeshConCount]; option.offMeshConDir = new int[option.offMeshConCount]; option.offMeshConAreas = new int[option.offMeshConCount]; option.offMeshConFlags = new int[option.offMeshConCount]; option.offMeshConUserID = new int[option.offMeshConCount]; - option.offMeshConCount = offMeshConnections.Count; for (int i = 0; i < option.offMeshConCount; i++) { RcOffMeshConnection offMeshCon = offMeshConnections[i];