Photon Quantum 3.0.0

Public Types | Static Public Member Functions | Public Attributes | Properties | List of all members
Quantum.Navigation.FindPathResult Struct Reference

The result object for FindPath requests. More...

Public Types

enum  Code
 The result codes for FindPath requests. More...
 

Static Public Member Functions

static FindPathResult CreateError (Code errorCode)
 Create a failed FindPathResult. More...
 
static FindPathResult CreateSuccess (FPVector3 correctedStartPosition, FPVector3 correctedEndPosition)
 Create a successful FindPathResult. More...
 

Public Attributes

FPVector3 CorrectedEndPosition
 The corrected or unchanged end position. More...
 
FPVector3 CorrectedStartPosition
 The possibly corrected or unchanged start position. More...
 
PathVertex[] Path => _pathFinderData != null ? _pathFinderData.Path : null
 The funneled and optimized path. Never cache this array it's only valid after one FindPath() call. More...
 
int PathSize => _pathFinderData != null ? _pathFinderData.PathSize : 0
 The size of the path. More...
 
PathVertex[] RawPath => _pathFinderData != null ? _pathFinderData.RawPath : null
 The raw unoptimized a* path. Never cache this array it's only valid after one FindPath() call. More...
 
int RawPathSize => _pathFinderData != null ? _pathFinderData.RawPathSize : 0
 The raw path size. More...
 
Code Result
 Pathfinding result. More...
 

Properties

IPathFinderData PathFinderData [set]
 Set the internal pathfinder data for this result. Access is granted through PathSize etc. More...
 

Detailed Description

The result object for FindPath requests.

Member Enumeration Documentation

◆ Code

The result codes for FindPath requests.

Enumerator
Success 

Find path was successful.

InvalidStartPosition 

Find path failed because the start position could not be moved on to the navmesh.

InvalidEndPosition 

Find path failed because the end position could not be moved on to the navmesh.

NoPathFound 

Find path failed because the pathfinding could not create a path.

PathTooLong 

Indicates that the path was larger than SimulationConfig.Navigation.RawPathSize and the allocation strategy is set to Fixed.

Member Function Documentation

◆ CreateSuccess()

static FindPathResult Quantum.Navigation.FindPathResult.CreateSuccess ( FPVector3  correctedStartPosition,
FPVector3  correctedEndPosition 
)
inlinestatic

Create a successful FindPathResult.

Parameters
correctedStartPositionThe corrected (NavMeshAgentConfig.AutomaticTargetCorrection) start position.
correctedEndPositionThe corrected (NavMeshAgentConfig.AutomaticTargetCorrection) end position.
Returns
Configured FindPathResult object

◆ CreateError()

static FindPathResult Quantum.Navigation.FindPathResult.CreateError ( Code  errorCode)
inlinestatic

Create a failed FindPathResult.

Parameters
errorCodeError code
Returns
Configured FindPathResult object

Member Data Documentation

◆ Result

Code Quantum.Navigation.FindPathResult.Result

Pathfinding result.

◆ CorrectedStartPosition

FPVector3 Quantum.Navigation.FindPathResult.CorrectedStartPosition

The possibly corrected or unchanged start position.

◆ CorrectedEndPosition

FPVector3 Quantum.Navigation.FindPathResult.CorrectedEndPosition

The corrected or unchanged end position.

◆ PathSize

int Quantum.Navigation.FindPathResult.PathSize => _pathFinderData != null ? _pathFinderData.PathSize : 0

The size of the path.

◆ Path

PathVertex [] Quantum.Navigation.FindPathResult.Path => _pathFinderData != null ? _pathFinderData.Path : null

The funneled and optimized path. Never cache this array it's only valid after one FindPath() call.

◆ RawPathSize

int Quantum.Navigation.FindPathResult.RawPathSize => _pathFinderData != null ? _pathFinderData.RawPathSize : 0

The raw path size.

◆ RawPath

PathVertex [] Quantum.Navigation.FindPathResult.RawPath => _pathFinderData != null ? _pathFinderData.RawPath : null

The raw unoptimized a* path. Never cache this array it's only valid after one FindPath() call.

Property Documentation

◆ PathFinderData

IPathFinderData Quantum.Navigation.FindPathResult.PathFinderData
set

Set the internal pathfinder data for this result. Access is granted through PathSize etc.