C# Class Pathfinding.NavGraph

Base class for all graphs
Mostrar archivo Open project: henryj41043/TheUnseen Class Usage Examples

Public Properties

Property Type Description
_sguid byte[]
active AstarPath
graphIndex uint
inverseMatrix UnityEngine.Matrix4x4

Private Properties

Property Type Description
Scan void

Public Methods

Method Description
Awake ( ) : void

This will be called on the same time as Awake on the gameObject which the AstarPath script is attached to. (remember, not in the editor) Use this for any initialization code which can't be placed in Scan

CountNodes ( ) : int
CreateNodes ( int number ) : void
DeserializeExtraInfo ( GraphSerializationContext ctx ) : void
GetNearest ( Vector3 position ) : NNInfo
GetNearest ( Vector3 position, NNConstraint constraint ) : NNInfo
GetNearest ( Vector3 position, NNConstraint constraint, GraphNode hint ) : NNInfo
GetNearestForce ( Vector3 position, NNConstraint constraint ) : NNInfo

Returns the nearest node to a position using the specified constraint.

GetNodes ( GraphNodeDelegateCancelable del ) : void
InSearchTree ( GraphNode node, Path path ) : bool
NodeColor ( GraphNode node, PathHandler data ) : Color
OnDestroy ( ) : void
OnDrawGizmos ( bool drawNodes ) : void
PostDeserialization ( ) : void
RelocateNodes ( Matrix4x4 oldMatrix, Matrix4x4 newMatrix ) : void
SafeOnDestroy ( ) : void
ScanGraph ( ) : void

Consider using AstarPath.Scan () instead since this function might screw things up if there is more than one graph. This function does not perform all necessary postprocessing for the graph to work with pathfinding (e.g flood fill). See the source of the AstarPath.Scan function to see how it can be used. In almost all cases you should use AstarPath.Scan instead.

ScanInternal ( ) : void
ScanInternal ( OnScanStatus statusCallback ) : void

Scans the graph, called from AstarPath.ScanInternal Override this function to implement custom scanning logic The statusCallback may be optionally called to show progress info in the editor

SerializeExtraInfo ( GraphSerializationContext ctx ) : void
SetMatrix ( Matrix4x4 m ) : void

Private Methods

Method Description
Scan ( ) : void

Method Details

Awake() public method

This will be called on the same time as Awake on the gameObject which the AstarPath script is attached to. (remember, not in the editor) Use this for any initialization code which can't be placed in Scan
public Awake ( ) : void
return void

CountNodes() public method

public CountNodes ( ) : int
return int

CreateNodes() public method

public CreateNodes ( int number ) : void
number int
return void

DeserializeExtraInfo() public method

public DeserializeExtraInfo ( GraphSerializationContext ctx ) : void
ctx Pathfinding.Serialization.GraphSerializationContext
return void

GetNearest() public method

public GetNearest ( Vector3 position ) : NNInfo
position Vector3
return NNInfo

GetNearest() public method

public GetNearest ( Vector3 position, NNConstraint constraint ) : NNInfo
position Vector3
constraint NNConstraint
return NNInfo

GetNearest() public method

public GetNearest ( Vector3 position, NNConstraint constraint, GraphNode hint ) : NNInfo
position Vector3
constraint NNConstraint
hint GraphNode
return NNInfo

GetNearestForce() public method

Returns the nearest node to a position using the specified constraint.
public GetNearestForce ( Vector3 position, NNConstraint constraint ) : NNInfo
position Vector3 /// A ///
constraint NNConstraint /// A ///
return NNInfo

GetNodes() public abstract method

public abstract GetNodes ( GraphNodeDelegateCancelable del ) : void
del GraphNodeDelegateCancelable
return void

InSearchTree() public method

public InSearchTree ( GraphNode node, Path path ) : bool
node GraphNode
path Path
return bool

NodeColor() public method

public NodeColor ( GraphNode node, PathHandler data ) : Color
node GraphNode
data PathHandler
return Color

OnDestroy() public method

public OnDestroy ( ) : void
return void

OnDrawGizmos() public method

public OnDrawGizmos ( bool drawNodes ) : void
drawNodes bool
return void

PostDeserialization() public method

public PostDeserialization ( ) : void
return void

RelocateNodes() public method

public RelocateNodes ( Matrix4x4 oldMatrix, Matrix4x4 newMatrix ) : void
oldMatrix UnityEngine.Matrix4x4
newMatrix UnityEngine.Matrix4x4
return void

SafeOnDestroy() public method

public SafeOnDestroy ( ) : void
return void

ScanGraph() public method

Consider using AstarPath.Scan () instead since this function might screw things up if there is more than one graph. This function does not perform all necessary postprocessing for the graph to work with pathfinding (e.g flood fill). See the source of the AstarPath.Scan function to see how it can be used. In almost all cases you should use AstarPath.Scan instead.
public ScanGraph ( ) : void
return void

ScanInternal() public method

public ScanInternal ( ) : void
return void

ScanInternal() public abstract method

Scans the graph, called from AstarPath.ScanInternal Override this function to implement custom scanning logic The statusCallback may be optionally called to show progress info in the editor
public abstract ScanInternal ( OnScanStatus statusCallback ) : void
statusCallback OnScanStatus
return void

SerializeExtraInfo() public method

public SerializeExtraInfo ( GraphSerializationContext ctx ) : void
ctx Pathfinding.Serialization.GraphSerializationContext
return void

SetMatrix() public method

public SetMatrix ( Matrix4x4 m ) : void
m UnityEngine.Matrix4x4
return void

Property Details

_sguid public_oe property

public byte[] _sguid
return byte[]

active public_oe property

public AstarPath active
return AstarPath

graphIndex public_oe property

public uint graphIndex
return uint

inverseMatrix public_oe property

public Matrix4x4,UnityEngine inverseMatrix
return UnityEngine.Matrix4x4