A script used to calculate HyperNav paths.
More...
|
| class | PropNames |
| | This is used to refer to the names of private fields in this class from a custom Editor. More...
|
| |
|
| AsyncPathHandle | FindPathAsync (NavSampleResult startHit, NavSampleResult endHit, Vector3 startPos, Vector3 endPos, NavPathfindingParams pathParams, NativeCancellationToken? cancellationToken=null) |
| | Find a path between two already-calculated nav query results, and return when it is completed. More...
|
| |
A script used to calculate HyperNav paths.
Can be used as a singleton, or you can have more than one if needed.
◆ DisposePath()
| void Infohazard.HyperNav.NavPathfinder.DisposePath |
( |
NavPath |
path | ) |
|
|
package |
◆ FindPathAsync()
| AsyncPathHandle Infohazard.HyperNav.NavPathfinder.FindPathAsync |
( |
NavSampleResult |
startHit, |
|
|
NavSampleResult |
endHit, |
|
|
Vector3 |
startPos, |
|
|
Vector3 |
endPos, |
|
|
NavPathfindingParams |
pathParams, |
|
|
NativeCancellationToken? |
cancellationToken = null |
|
) |
| |
Find a path between two already-calculated nav query results, and return when it is completed.
If pathfinding cannot occur, for example because there are no volumes, this method will return null synchronously. If no path can be found, the a null path will be returned asynchronously.
- Parameters
-
| startHit | Query result for the start of the path. |
| endHit | Query result for the end of the path. |
| startPos | Start position for the path. |
| endPos | Destination for the path. |
| pathParams | Parameters for pathfinding. |
| cancellationToken | Cancellation token for the operation. |
- Returns
- A task that will yield the calculated path, or null if pathfinding cannot occur.
◆ LateUpdate()
| void Infohazard.HyperNav.NavPathfinder.LateUpdate |
( |
| ) |
|
|
private |
Move paths from the pending queue and start executing them.
◆ OnDisable()
| void Infohazard.HyperNav.NavPathfinder.OnDisable |
( |
| ) |
|
|
private |
Dispose the pools of pending paths and completed paths, and all memory allocated for pathfinding jobs.
◆ OnEnable()
| void Infohazard.HyperNav.NavPathfinder.OnEnable |
( |
| ) |
|
|
private |
◆ CpuCoreUtilization
| float Infohazard.HyperNav.NavPathfinder.CpuCoreUtilization |
|
getset |
The percentage of CPU cores utilized for pathfinding jobs.
The value determines the proportion of available CPU cores allocated for pathfinding tasks. It will always ensure at least one core is used and will not exceed the total number of cores.
◆ IsMainInstance
| bool Infohazard.HyperNav.NavPathfinder.IsMainInstance |
|
getset |
Whether to set NavPathfinder.Instance to this instance.
This cannot be set while the game is running.
◆ MainInstance
The main instance, which should be used in most situations.
If you need more than one NavPathfinder, you can use direct references to other instances with IsMainInstance set to false.
◆ PathTighteningIterations
| int Infohazard.HyperNav.NavPathfinder.PathTighteningIterations |
|
getset |
Number of times to apply the path tightening operation to attempt to shorten the path.
The documentation for this class was generated from the following file: