/// Policy for how often to recalculate an agent's path.
///
/// See: <see cref="AIBase.autoRepath"/>
/// See: <see cref="AILerp.autoRepath"/>
/// </summary>
[System.Serializable]
publicclassAutoRepathPolicy{
/// <summary>Policy mode for how often to recalculate an agent's path.</summary>
publicenumMode:byte{
/// <summary>
/// Never automatically recalculate the path.
/// Paths can be recalculated manually by for example calling <see cref="IAstarAI.SearchPath"/> or <see cref="IAstarAI.SetPath"/>.
/// This mode is useful if you want full control of when the agent calculates its path.
/// </summary>
Never,
/// <summary>
/// Recalculate the path every <see cref="period"/> seconds.
///
/// This is primarily included for historical reasons, but might be useful if you want the path recalculations to happen at a very predictable rate.
/// In most cases it is recommended to use the Dynamic mode.
/// </summary>
EveryNSeconds,
/// <summary>
/// Recalculate the path at least every <see cref="maximumPeriod"/> seconds but more often if the destination moves a lot.
/// This mode is recommended since it allows the agent to quickly respond to new destinations without using up a lot of CPU power to calculate paths
/// when it doesn't have to.
///
/// More precisely:
/// Let C be a circle centered at the destination for the last calculated path, with a radius equal to the distance to that point divided by <see cref="sensitivity"/>.
/// If the new destination is outside that circle the path will be immediately recalculated.
/// Otherwise let F be the 1 - (distance from the circle's center to the new destination divided by the circle's radius).
/// So F will be 1 if the new destination is the same as the old one and 0 if it is at the circle's edge.
/// Recalculate the path if the time since the last path recalculation is greater than <see cref="maximumPeriod"/> multiplied by F.
///
/// Thus if the destination doesn't change the path will be recalculated every <see cref="maximumPeriod"/> seconds.
/// </summary>
Dynamic,
}
/// <summary>
/// Policy to use when recalculating paths.
///
/// See: <see cref="AutoRepathPolicy.Mode"/> for more details.
/// </summary>
publicModemode=Mode.Dynamic;
/// <summary>Number of seconds between each automatic path recalculation for Mode.EveryNSeconds</summary>