A* Pathfinding Project
4.0.1
The A* Pathfinding Project for Unity 3D
|
Helper for navmesh cut objects. More...
Helper for navmesh cut objects.
Adding an instance of this component into the scene makes sure that NavmeshCut components update the recast graph correctly when they move around.
Public Member Functions | |
void | DiscardPending () |
Discards all pending updates caused by moved or modified navmesh cuts. | |
void | ForceUpdate () |
Checks all NavmeshCut instances and updates graphs if needed. | |
void | UseSpecifiedHandler (TileHandler handler) |
Use the specified handler, will create one at start if not called. | |
Public Attributes | |
float | updateInterval |
How often to check if an update needs to be done (real seconds between checks). | |
Private Member Functions | |
void | HandleOnDisableCallback (NavmeshCut obj) |
Called when a NavmeshCut is disabled. | |
void | HandleOnDisableCallback (NavmeshAdd obj) |
Called when a NavmeshAdd is disabled. | |
void | HandleOnEnableCallback (NavmeshCut obj) |
Called when a NavmeshCut is enabled. | |
void | HandleOnEnableCallback (NavmeshAdd obj) |
Called when a NavmeshAdd is enabled. | |
void | OnDisable () |
void | OnEnable () |
void | OnRecalculatedTiles (NavmeshTile[] tiles) |
Called when some recast graph tiles have been completely recalculated. | |
void | Start () |
void | Update () |
Update is called once per frame. | |
Static Private Member Functions | |
static void | ReAddItems< T > (List< T > items, System.Action< T > action) |
Private Attributes | |
List< NavmeshAdd > | addsPendingRegistration = new List<NavmeshAdd>() |
NavmeshAdds that were enabled while this component did not have a TileHandler set. | |
List< NavmeshCut > | cutsPendingRegistration = new List<NavmeshCut>() |
Cuts that were enabled while this component did not have a TileHandler set. | |
readonly List< Bounds > | forcedReloadBounds = new List<Bounds>() |
readonly List< IntRect > | forcedReloadRects = new List<IntRect>() |
TileHandler | handler |
float | lastUpdateTime = -999 |
Additional Inherited Members | |
Protected Member Functions inherited from VersionedMonoBehaviour | |
virtual void | Awake () |
virtual int | OnUpgradeSerializedData (int version) |
Handle serialization backwards compatibility. | |
void DiscardPending | ( | ) |
Discards all pending updates caused by moved or modified navmesh cuts.
void ForceUpdate | ( | ) |
Checks all NavmeshCut instances and updates graphs if needed.
|
private |
Called when a NavmeshCut is disabled.
|
private |
Called when a NavmeshAdd is disabled.
|
private |
Called when a NavmeshCut is enabled.
|
private |
Called when a NavmeshAdd is enabled.
|
private |
|
private |
|
private |
Called when some recast graph tiles have been completely recalculated.
|
staticprivate |
T | : | MonoBehaviour |
|
private |
|
private |
Update is called once per frame.
void UseSpecifiedHandler | ( | TileHandler | handler | ) |
Use the specified handler, will create one at start if not called.
|
private |
NavmeshAdds that were enabled while this component did not have a TileHandler set.
|
private |
Cuts that were enabled while this component did not have a TileHandler set.
|
private |
|
private |
|
private |
float updateInterval |
How often to check if an update needs to be done (real seconds between checks).
For very large worlds with lots of NavmeshCut objects, it might be a performance penalty 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