C# Класс Pathfinding.NavGraph

Base class for all graphs
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
_sguid byte[]
active AstarPath
graphIndex uint
inverseMatrix UnityEngine.Matrix4x4

Private Properties

Свойство Тип Описание
Scan void

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
Scan ( ) : void

Описание методов

Awake() публичный Метод

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
Результат void

CountNodes() публичный Метод

public CountNodes ( ) : int
Результат int

CreateNodes() публичный Метод

public CreateNodes ( int number ) : void
number int
Результат void

DeserializeExtraInfo() публичный Метод

public DeserializeExtraInfo ( GraphSerializationContext ctx ) : void
ctx Pathfinding.Serialization.GraphSerializationContext
Результат void

GetNearest() публичный Метод

public GetNearest ( Vector3 position ) : NNInfo
position Vector3
Результат NNInfo

GetNearest() публичный Метод

public GetNearest ( Vector3 position, NNConstraint constraint ) : NNInfo
position Vector3
constraint NNConstraint
Результат NNInfo

GetNearest() публичный Метод

public GetNearest ( Vector3 position, NNConstraint constraint, GraphNode hint ) : NNInfo
position Vector3
constraint NNConstraint
hint GraphNode
Результат NNInfo

GetNearestForce() публичный Метод

Returns the nearest node to a position using the specified constraint.
public GetNearestForce ( Vector3 position, NNConstraint constraint ) : NNInfo
position Vector3 /// A ///
constraint NNConstraint /// A ///
Результат NNInfo

GetNodes() публичный абстрактный Метод

public abstract GetNodes ( GraphNodeDelegateCancelable del ) : void
del GraphNodeDelegateCancelable
Результат void

InSearchTree() публичный Метод

public InSearchTree ( GraphNode node, Path path ) : bool
node GraphNode
path Path
Результат bool

NodeColor() публичный Метод

public NodeColor ( GraphNode node, PathHandler data ) : Color
node GraphNode
data PathHandler
Результат Color

OnDestroy() публичный Метод

public OnDestroy ( ) : void
Результат void

OnDrawGizmos() публичный Метод

public OnDrawGizmos ( bool drawNodes ) : void
drawNodes bool
Результат void

PostDeserialization() публичный Метод

public PostDeserialization ( ) : void
Результат void

RelocateNodes() публичный Метод

public RelocateNodes ( Matrix4x4 oldMatrix, Matrix4x4 newMatrix ) : void
oldMatrix UnityEngine.Matrix4x4
newMatrix UnityEngine.Matrix4x4
Результат void

SafeOnDestroy() публичный Метод

public SafeOnDestroy ( ) : void
Результат void

ScanGraph() публичный Метод

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
Результат void

ScanInternal() публичный Метод

public ScanInternal ( ) : void
Результат void

ScanInternal() публичный абстрактный Метод

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
Результат void

SerializeExtraInfo() публичный Метод

public SerializeExtraInfo ( GraphSerializationContext ctx ) : void
ctx Pathfinding.Serialization.GraphSerializationContext
Результат void

SetMatrix() публичный Метод

public SetMatrix ( Matrix4x4 m ) : void
m UnityEngine.Matrix4x4
Результат void

Описание свойств

_sguid публичное свойство

public byte[] _sguid
Результат byte[]

active публичное свойство

public AstarPath active
Результат AstarPath

graphIndex публичное свойство

public uint graphIndex
Результат uint

inverseMatrix публичное свойство

public Matrix4x4,UnityEngine inverseMatrix
Результат UnityEngine.Matrix4x4