Repository navigation
v0.5.0-preview.1
Pre-release
Pre-release
·
22 commits
to main
since this release
Breaking
- Options are immutable after construction.
GridOptions,VoxelOptionsandPathOptionsproperties areinit-only likeNavSettings,CrowdOptionsandGraphOptionsalready were, so a shared preset (GridOptions.Default, the defaults used when you passnull) cannot be changed by one caller under another. Code that assigned a property after construction (o.Algorithm = GridAlgorithm.Jps;) must set it in an object initializer (new GridOptions { Algorithm = GridAlgorithm.Jps }). Binary-incompatible with 0.4.0-preview.3 (setters are replaced by init accessors); recompiling is enough.Clone()is kept. FindPathgains a trailingCancellationToken cancellationToken = defaultonGrid,HexGrid,VoxelGrid,NavMesh,NavWorld,NavMeshQueryand theTiledNavMeshextension, so existing source compiles unchanged but already-built callers must be recompiled (the old signatures are gone).
Added
- Cancellation on every tier-1
FindPath: the token is checked every 256 iterations; cancelling throwsOperationCanceledExceptionand leaves the grid or mesh untouched. A token that is never cancelled returns exactly the result of no token (slicing never changes a search). NavMesh.FindPathAsyncandGrid.FindPathAsync(cells and world points): same results as the synchronous forms. The mesh form isNavMeshQuery.FindPathAsync(slices of expansions with a yield between them); the grid form runs the synchronous search on the thread pool.- Documentation of the cross-tier conventions (immutable options, cancellation, observer-style listeners) in
docs/README.md; the 3D builder and mesh format public members got a documentation pass. GridSearchruns JPS and JPS+:Grid.CreateSearchacceptsGridAlgorithm.JpsandGridAlgorithm.JpsPluson the enginesFindPathuses (the specialised octile jump point search, the generic block-map and JPS+ table searches, or plain A* whereFindPathfalls back to it), so a budgeted jump point search resumes withStep(budget), returns cell for cell the path and cost bitsFindPathreturns for every slicing, and saves and restores byte-exactly. One iteration is one pop of a jump point. State kind 12 gains mode 3 (specialised jump point engine), documented indocs/grids-state.md; existing states are unchanged.
Changed
GridSearch.SaveState(Span<byte>),GetStateSizeandRestoreStateallocate nothing in steady state on the generic engine too (the handle keeps one serialisation buffer);GridSearch.UsesSpecializedEnginenow answers from the options and the grid before the first search.