Skip to content

Recast Navigation - Sandbox Fork 1.0 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 26 commits into
base: release
Choose a base branch
from
Open

Conversation

AdrienMichon-Sandbox
Copy link

Description

This is the native code that is used by the Unity plugin in this repo

Dev

This (public) repo is a fork of Recast Navigation.
The C++ code is divided in several projects.

The Visual studio projects can be built using premake, in the same way it is mentionned in the original repository's documentation.

Most of the code was inspired/copied from the RecastDemo project, which is not included in the dll used by the Unity plugin.
There are just a few specifities linked to the Sandbox, like the fact that we sometimes use blocks and they have a size of (1;1;1), but that's all.

Added a project for the DLL and the exposed methods
…reate correctly the sln

Adding CMAKE and premake files to the plugin source, to be able the create correctly the sln
Exposed some API
Made the built dll go directly into the correct location in the package
Wrapped all the geometry data into a struct
TileMesh building v1
Added NavMeshBuildData to handle memory freeing
Decreased code duplication
Renamed some methods
Tile building paralellization v1
Added a mutex to ensure that two tiles are not added at the same time
Fixed some bugs
Fixed some crash + made the chunkyMesh reused
Added a way to build tiles without chunkyTriMesh
minor change
Added a method to get the border of the tiles
Fixed compilation issue
…ation

Added the block marking + usage of a query filter for the path computation
Added some methods to get data for the debug drawing
Fixed the area marking
… to the Unity side

Added a context to be able to return the timings from the native side to the Unity side
Storing NavMesh and NavMeshQuery by environment id
Cleaned code and added comments
Added comments
/// The world position of the center of the block.
float center[3];
/// The type of the block.
int area;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better to name this type or areaType, having center and area makes me think this is a volume of some kind.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok yes, I'll go for areaType. It corresponds to something called area in the NavMesh

@@ -0,0 +1,252 @@
#include <windows.h>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this being stripped in non-windows builds, does this compile in linux and mac?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not. I will check on Mac on Wednesday when I can use the Mac in the office.

Made the plugin work when using MacOS
Fixed Linux compilation (code to clean later)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants