Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

SharpNav

> 编程语言
Open source

Advanced Pathfinding for C#

558 stars0 likes1 views
WebsiteGitHub

About

Advanced Pathfinding for C#

What is it?

SharpNav is a library that generates and finds paths through navigation meshes. It is functionally equivalent to Mikko Monomen's wonderful Recast Navigation.

SharpNav is proudly an RCOS project.

What are the benefits of SharpNav over alternatives?

There are several:

  • It's portable! SharpNav is written entirely in C#, so that the same SharpNav.dll will run on all .NET or Mono supported platforms, no recompilation necessary.
  • It's fast! SharpNav was written with performance in mind and performs competitively with Recast.
  • It's free! SharpNav is licensed under the MIT License.
  • It's clean! SharpNav aims to maintain a clean and concise public API that matches that of the Base Class Library. It also strives to maintain clean source code by following style and structure rules enforced by both StyleCop and FxCop.
  • It's integrated! SharpNav has compile configurations to integrate with various graphics toolkits and game engines. In the near future, there will be integration with game engine content pipelines as well.

Usage

SharpNav is both highly configurable and simple to use. If you want to generate a NavMesh from a single mesh, it is as simple as the following block of code:

csharp
//prepare the geometry from your mesh data
var tris = TriangleEnumerable.FromIndexedVertices( ... );

//use the default generation settings
var settings = NavMeshGenerationSettings.Default;
settings.AgentHeight = 1.7f;
settings.AgentWidth = 0.6f;

//generate the mesh
var navMesh = NavMesh.Generate(tris, settings);

For finer control over the generation process, you can refer to the Examples project.

Quick Start

NuGet

SharpNav is available on NuGet. It can be installed by issuing the following command in the package manager console:

PM> Install-Package SharpNav

There are also NuGet packages for the versions of SharpNav that integrate with other frameworks:

  • SharpNav.MonoGame
  • SharpNav.OpenTK
  • SharpNav.SharpDX

From Source

SharpNav follows the standard C# project structure. It is actively developed on Windows with Visual Studio 2015 and on Linux and OS X with MonoDevelop, so it should compile just fine in those cases.

Binaries are not output to their project's local bin folder, they are all output to the Binaries folder in the repository's root directory.

SharpNav can be configured to depend on other libraries. Each one has it's own compile configuration that require at least one extra NuGet package. The way the project is currently structured requires all of the engine integrations' packages to be downloaded regardless of which configuration is selected (this balloons the size of a checked out and built repository to a little over 400MB). Fixing this would be a great contribution if anyone reading this is a MSBuild guru :stuck_out_tongue:

Mailing List

Join the SharpNav mailing list to ask questions about SharpNav or for help with using it. New versions of SharpNav will also be announced on the same mailing list.

License

SharpNav is licensed under the MIT license. The terms of the MIT license are included in both the LICENSE file and below:

…

Major contributors to SharpNav are listed in the CONTRIBUTORS file.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C#

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言