Robmaister / SharpNav

Advanced Pathfinding for C#
sharpnav.com
Other
537 stars 129 forks source link

Json nav mesh serialization #36

Closed Sgreben72 closed 9 years ago

Sgreben72 commented 9 years ago

Completed working version of json serialization. Not sure I did everything right, particularly, I'm afraid it may not work right with multiple tiles. However it works right both with test data(from Example project) and with map in our project. Test doesn't check if operations worked correctly - just that they don't throw exceptions.

Unfortunately I don't have time to finish it/make sure it works correctly for all cases and implement binary serialization. If you won't do this , I'll probably come back to it in few months.

Any feedback is appreciated.

P.S: This is first time I'm doing pull request on GitHub, did I do it right?

Robmaister commented 9 years ago

It should be a relatively simple fix. Remove all the preprocessor #ifs and drop in the block in CONTRIBUTING.md for both the test that you added as well as the actual NavMeshJsonSerializer.

If that doesn't work then the Tests project isn't configured correctly and I can take care of that. If you really don't have any time for that, I can try and take care of it, I just generally like having the CI services pass before I pull something in.

Besides that, great job on the pull request! Glad you actually added tests! I wouldn't consider the API stable enough to warrant using reflection instead of just modifying TiledNavMesh and BVTree, because that's probably what I'm going to do after I pull this in :stuck_out_tongue:.

I'll almost definitely get to binary serialization at some point in the summer, but if I don't feel free to contact me or start working on it.

Robmaister commented 9 years ago

Also, fixes #35

Robmaister commented 9 years ago

Went ahead and made the changes and pulled it in. Thanks!