Helper for navmesh cut objects.
More...
Helper for navmesh cut objects.
Responsible for keeping track of which navmesh cuts have moved and coordinating graph updates to account for those changes.
- See also
- Navmesh Cutting
-
AstarPath.navmeshUpdates
-
Pathfinding.NavmeshBase.enableNavmeshCutting
- A* Pro Feature:
- This is an A* Pathfinding Project Pro feature only. This function/class/variable might not exist in the Free version of the A* Pathfinding Project or the functionality might be limited
The Pro version can be bought here
|
float | updateInterval |
| How often to check if an update needs to be done (real seconds between checks). More...
|
|
◆ DiscardPending()
Discards all pending updates caused by moved or modified navmesh cuts.
◆ ForceUpdate()
Checks all NavmeshCut instances and updates graphs if needed.
- Note
- This schedules updates for all necessary tiles to happen as soon as possible. The pathfinding threads will continue to calculate the paths that they were calculating when this function was called and then they will be paused and the graph updates will be carried out (this may be several frames into the future and the graph updates themselves may take several frames to complete). If you want to force all navmesh cutting to be completed in a single frame call this method and immediately after call AstarPath.FlushWorkItems.
◆ ForceUpdateAround()
◆ HandleOnDisableCallback()
◆ HandleOnEnableCallback()
◆ OnDisable()
◆ OnEnable()
◆ Update()
Update is called once per frame.
◆ lastUpdateTime
float lastUpdateTime = float.NegativeInfinity |
|
private |
Last time navmesh cuts were applied.
◆ updateInterval
How often to check if an update needs to be done (real seconds between checks).
For worlds with a very large number of NavmeshCut objects, it might be bad for performance to do this check every frame. If you think this is a performance penalty, increase this number to check less often.
For almost all games, this can be kept at 0.
If negative, no updates will be done. They must be manually triggered using ForceUpdate.
You can also find this in the AstarPath inspector under Settings.
The documentation for this class was generated from the following file:
- /Users/arong/Unity/a-pathfinding-project/Assets/AstarPathfindingProject/Navmesh/NavmeshUpdates.cs