/// <summary>Reference to the AstarPath object in the scene</summary>
publicAstarPathactive;
/// <summary>
/// Used as an ID of the graph, considered to be unique.
/// Note: This is Pathfinding.Util.Guid not System.Guid. A replacement for System.Guid was coded for better compatibility with iOS
/// </summary>
[JsonMember]
publicGuidguid;
/// <summary>
/// Default penalty to apply to all nodes.
///
/// See: graph-updates (view in online documentation for working links)
/// See: <see cref="GraphNode.Penalty"/>
/// See: tags (view in online documentation for working links)
/// </summary>
[JsonMember]
publicuintinitialPenalty;
/// <summary>Is the graph open in the editor</summary>
[JsonMember]
publicboolopen;
/// <summary>Index of the graph, used for identification purposes</summary>
publicuintgraphIndex;
/// <summary>
/// Name of the graph.
/// Can be set in the unity editor
/// </summary>
[JsonMember]
publicstringname;
/// <summary>
/// Enable to draw gizmos in the Unity scene view.
/// In the inspector this value corresponds to the state of
/// the 'eye' icon in the top left corner of every graph inspector.
/// </summary>
[JsonMember]
publicbooldrawGizmos=true;
/// <summary>
/// Used in the editor to check if the info screen is open.
/// Should be inside UNITY_EDITOR only \<see cref="ifs"/> but just in case anyone tries to serialize a NavGraph instance using Unity, I have left it like this as it would otherwise cause a crash when building.
/// Version 3.0.8.1 was released because of this bug only
/// </summary>
[JsonMember]
publicboolinfoScreenOpen;
/// <summary>Used in the Unity editor to store serialized settings for graph inspectors</summary>
[JsonMember]
stringserializedEditorSettings;
/// <summary>True if the graph exists, false if it has been destroyed</summary>
internalboolexists=>active!=null;
/// <summary>
/// True if the graph has been scanned and contains nodes.
///
/// Graphs are typically scanned when the game starts, but they can also be scanned manually.
///
/// If a graph has not been scanned, it does not contain any nodes and it not possible to use it for pathfinding.
///
/// See: <see cref="AstarPath.Scan(NavGraph)"/>
/// </summary>
publicabstractboolisScanned{get;}
/// <summary>
/// True if the graph will be included when serializing graph data.
///
/// If false, the graph will be ignored when saving graph data.
///
/// Most graphs are persistent, but the <see cref="LinkGraph"/> is not persistent because links are always re-created from components at runtime.
/// </summary>
publicvirtualboolpersistent=>true;
/// <summary>
/// True if the graph should be visible in the editor.
///
/// False is used for some internal graph types that users don't have to worry about.
/// </summary>
publicvirtualboolshowInInspector=>true;
/// <summary>
/// World bounding box for the graph.
///
/// This always contains the whole graph.
///
/// Note: Since this an axis aligned bounding box, it may not be particularly tight if the graph is rotated.
///
/// It is ok for a graph type to return an infinitely large bounding box, but this may make some operations less efficient.
/// The point graph will always return an infinitely large bounding box.
/// True if the point is on a walkable part of the navmesh, as seen from above.
///
/// A point is considered on the navmesh if it is above or below a walkable navmesh surface, at any distance,
/// and if it is not above/below a closer unwalkable node.
///
/// Note: This means that, for example, in multi-story building a point will be considered on the navmesh if any walkable floor is below or above the point.
/// If you want more complex behavior then you can use the GetNearest method together with the appropriate <see cref="NNConstraint.distanceMetric"/> settings for your use case.
///
/// This uses the graph's natural up direction to determine which way is up.
/// Therefore, it will also work on rotated graphs, as well as graphs in 2D mode.
///
/// This method works for all graph types.
/// However, for <see cref="PointGraph"/>s, this will never return true unless you pass in the exact coordinate of a node, since point nodes do not have a surface.
///
/// Note: For spherical navmeshes (or other weird shapes), this method will not work as expected, as there's no well defined "up" direction.
///
/// [Open online documentation to see images]
///
/// See: <see cref="AstarPath.IsPointOnNavmesh"/> to check all graphs, instead of a single one.
/// </summary>
/// <param name="position">The point to check</param>
thrownewSystem.Exception("Trying to update graphs when it is not safe to do so. Graph updates must be done inside a work item or when a graph is being scanned. See AstarPath.AddWorkItem");
}
}
/// <summary>
/// Notifies the system that changes have been made inside these bounds.
///
/// This should be called by graphs whenever they are changed.
/// It will cause off-mesh links to be updated, and it will also ensure <see cref="GraphModifier"/> events are callled.
///
/// The bounding box should cover the surface of all nodes that have been updated.
/// It is fine to use a larger bounding box than necessary (even an infinite one), though this may be slower, since more off-mesh links need to be recalculated.
/// You can even use an infinitely large bounding box if you don't want to bother calculating a more accurate one.
/// You can also call this multiple times to dirty multiple bounding boxes.
///
/// When scanning the graph, this is called automatically - with the value from the <see cref="bounds"/> property - for all graphs after the scanning has finished.
///
/// Note: If possible, it is recommended to use <see cref="IGraphUpdateContext.DirtyBounds"/> or <see cref="IWorkItemContext.DirtyBounds"/> instead of this method.
/// They currently do the same thing, but that may change in future versions.
/// Lower bound on the squared distance from the given point to the closest node in this graph.
///
/// This is used to speed up searching for the closest node when there is more than one graph in the scene,
/// by checking the graphs in order of increasing estimated distance to the point.
///
/// Implementors may return 0 at all times if it is hard to come up with a good lower bound.
/// It is more important that this function is fast than that it is accurate.
/// </summary>
/// <param name="position">The position to check from</param>
/// <param name="constraint">A constraint on which nodes are valid. This may or may not be used by the function. You may pass null if you consider all nodes valid.</param>
/// See: wander (view in online documentation for working links)
/// </summary>
/// <param name="nnConstraint">Optionally set to constrain which nodes are allowed to be returned. If null, all nodes are allowed, including unwalkable ones.</param>
/// <param name="highQuality">If true, this method is allowed to be more computationally heavy, in order to pick a random point more uniformly (based on the nodes' surface area).
/// If false, this method should be fast as possible, but the distribution of sampled points may be a bit skewed. This setting only affects recast and navmesh graphs.</param>