TileHandlerHelper.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using Pathfinding.Util;
  2. using UnityEngine;
  3. namespace Pathfinding {
  4. /// <summary>
  5. /// Helper for navmesh cut objects.
  6. ///
  7. /// Deprecated: Use <see cref="AstarPath.navmeshUpdates"/> instead
  8. /// </summary>
  9. [System.Obsolete("Use AstarPath.navmeshUpdates instead. You can safely remove this component.")]
  10. [HelpURL("http://arongranberg.com/astar/documentation/stable/class_pathfinding_1_1_tile_handler_helper.php")]
  11. public class TileHandlerHelper : VersionedMonoBehaviour {
  12. /// <summary>How often to check if an update needs to be done (real seconds between checks).</summary>
  13. public float updateInterval {
  14. get { return AstarPath.active.navmeshUpdates.updateInterval; }
  15. set { AstarPath.active.navmeshUpdates.updateInterval = value; }
  16. }
  17. /// <summary>Use the specified handler, will create one at start if not called</summary>
  18. [System.Obsolete("All navmesh/recast graphs now use navmesh cutting")]
  19. public void UseSpecifiedHandler (TileHandler newHandler) {
  20. throw new System.Exception("All navmesh/recast graphs now use navmesh cutting");
  21. }
  22. /// <summary>Discards all pending updates caused by moved or modified navmesh cuts</summary>
  23. public void DiscardPending () {
  24. AstarPath.active.navmeshUpdates.DiscardPending();
  25. }
  26. /// <summary>Checks all NavmeshCut instances and updates graphs if needed.</summary>
  27. public void ForceUpdate () {
  28. AstarPath.active.navmeshUpdates.ForceUpdate();
  29. }
  30. }
  31. }