Repository navigation
Additions only: every 1.0 result and saved format is unchanged, and 1.0 data loads as before.
Added
NavMesh.Save/TrySave/GetSaveSizeandNavMesh.Load,NavWorld.Save/TrySave/GetSaveSizeandNavWorld.Load: a baked tier-1 mesh (or a world of agent classes) saves to bytes and loads back as a tier-1NavMesh/NavWorld, withSettings,CreateCrowd,CreateStreamer,FindPathAsyncand the query members working, and the same bits from every query. The bytes are a small envelope (ONNM,ONNW) around the unchanged version 2 mesh bytes and carry theNavSettings;Load(bytes, settings)also takes bareNavMeshSerializer.WriteMeshbytes, checking the settings against the mesh's build fingerprint (NavMeshFingerprintExceptionon a mismatch). Layout indocs/navmesh-format.md; new fixtures underFixtures/1.1.0; a fuzz targetnavmesh-load.Crowd.TryAdd: likeAdd, but returnsfalseinstead of throwing when no walkable polygon is near the position or the crowd is full.Addis unchanged. The one policy for positions off the mesh is written down indocs/path-results.md.NavMesh.Build(ReadOnlySpan<float> vertices, ReadOnlySpan<int> indices, NavSettings?): single-precision input, as engines andSystem.Numericsarrays hold it. The float to double step is exact, so the mesh is byte-equal to the double overload's on the same values.DefaultQueryFilter, a structIQueryFilterthat accepts every polygon at cost 1 and gives exactly the results ofnew QueryFilter(), so the allocation-free spanFindPath<TFilter>needs no user-written filter.Grid.FindPathWithPoints(Cell, Cell, ...): the cell form ofFindPathwithGridPath.Pointsfilled with the world-space cell centres throughGrid.Space, soLengthis a number instead of NaN.FindPath(Cell, Cell)is unchanged.docs/migrating.md: concept, type and unit tables for moving from Recast, Detour, DotRecast and Unity's navigation, and the note that their mesh bytes must be re-baked.
Changed
- Error messages of
AgentOptions.Validate,CrowdOptions.ValidateandFollowerOptions.Validatenow state the allowed range (SeparationWeight must be 0 to 1.); the setters ofHpaOptionsandOrcaSimulator.MaxThreadsreport their own property name asParamNameinstead ofvalue. Exception types are unchanged.