High Level API Components for Runtime NavMesh Building
Перейти к файлу
Maxime Plantady 41d24c4639
Merge pull request #224 from Unity-Technologies/readme-update-new-development
Update readme with information about AI Navigation package
2021-07-27 08:47:05 -04:00
Assets 2020.1 compatibility 2020-12-04 10:52:31 +01:00
Documentation Add missing spaces to # in md files. 2017-04-07 15:01:29 +02:00
Packages Update project to 2019.4.0f1 (LTS). 2020-07-20 15:36:22 +02:00
ProjectSettings Update project to 2019.4.0f1 (LTS). 2020-07-20 15:36:22 +02:00
.gitattributes Repair the updated serialization of the tile prefabs. 2020-02-10 11:26:00 +01:00
.gitignore Add .gitattributes and update .gitignore. 2018-12-18 16:41:25 +01:00
LICENSE Bump year to match actual 2016-10-14 08:22:31 +02:00
README.md Reviewed readme 2021-07-27 08:46:35 -04:00

README.md

Status of the project

Development

This project is now developed as part of the AI Navigation package. Please add that package to your project in order to continue building the NavMesh using these components and to get access to newer versions.

The content of this repository remains available for older Unity versions but no further development will be made here.

Questions and feature requests

Please use the AI & Navigation Previews section of the forum to discuss about the AI Navigation package and to stay informed about major releases.

You can learn about the future developments of AI Navigation and also share your feature requests in the Unity Platform Roadmap portal.

Bug Reporting

The Issues section of this repository is closed. Please use the Unity built-in report system to report any bugs that you find in the AI Navigation package.

Using This Repository

Components for Runtime NavMesh Building

Here we introduce four components for the navigation system:

  • NavMeshSurface – for building and enabling a NavMesh surface for one agent type.
  • NavMeshModifier – affects the NavMesh generation of NavMesh area types, based on the transform hierarchy.
  • NavMeshModifierVolume – affects the NavMesh generation of NavMesh area types, based on volume.
  • NavMeshLink – connects same or different NavMesh surfaces for one agent type.

These components comprise the high level controls for building and using NavMeshes at runtime as well as edit time.

Detailed information can be found in the Documentation section or in the NavMesh building components section of the Unity Manual.

How To Get Started

Download and install Unity 5.6 or newer.

Clone or download this repository and open the project in Unity. Alternatively, you can copy the contents of Assets/NavMeshComponents to an existing project.

Make sure to select a branch of the repository that matches the Unity version:

master for 2020.3-LTS, 2019.3 for up to 2019.4-LTS, 2018.3 for up to 2018.4-LTS and 2019.2, 2018.2, 2018.1, 2017.2 for up to 2017.4-LTS, 2017.1, 5.6.

Additional examples are available in the Assets/Examples folder. The examples are provided "as is". They are neither generic nor robust, but serve as inspiration.

Note: During the beta cycle features and API are subject to change.
Make sure to backup an existing project before opening it with a beta build.

FAQ

Q: Can I bake a NavMesh at runtime?
A: Yes.

Q: Can I use NavMesh'es for more than one agent size?
A: Yes.

Q: Can I put a NavMesh in a prefab?
A: Yes - with some limitations.

Q: How do I connect two NavMesh surfaces?
A: Use the NavMeshLink to connect the two sides.

Q: How do I query the NavMesh for one specific size of agent?
A: Use the NavMeshQuery filter when querying the NavMesh.

Q: What's the deal with the 'DefaultExecutionOrder' attribute?
A: It gives a way of controlling the order of execution of scripts - specifically it allows us to build a NavMesh before the (native) NavMeshAgent component is enabled.

Q: What's the use of the new delegate 'NavMesh.onPreUpdate'?
A: It allows you to hook in to controlling the NavMesh data and links set up before the navigation update loop is called on the native side.

Q: Can I do moving NavMesh platforms?
A: No - new API is required for consistently moving platforms carrying agents.

Q: Is OffMeshLink now obsolete?
A: No - you can still use OffMeshLink - however you'll find that NavMeshLink is more flexible and have less overhead.

Q: What happened to HeightMesh and Auto Generated OffMeshLinks?
A: They're not supported in the new NavMesh building feature. HeightMesh will be added at some point. Auto OffMeshLink generation will possibly be replaced with a solution that allows better control of placement.