Class NavMesh
Assembly: UnityEngine.dll
Syntax
[MovedFrom("UnityEngine")]
public static class NavMesh
Fields
|
Improve this Doc
View Source
AllAreas
Declaration
public const int AllAreas = -1
Field Value
|
Improve this Doc
View Source
onPreUpdate
Declaration
public static NavMesh.OnNavMeshPreUpdate onPreUpdate
Field Value
Properties
|
Improve this Doc
View Source
avoidancePredictionTime
Declaration
public static float avoidancePredictionTime { get; set; }
Property Value
|
Improve this Doc
View Source
pathfindingIterationsPerFrame
Declaration
public static int pathfindingIterationsPerFrame { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
AddLink(NavMeshLinkData)
Declaration
public static NavMeshLinkInstance AddLink(NavMeshLinkData link)
Parameters
Returns
|
Improve this Doc
View Source
AddLink(NavMeshLinkData, Vector3, Quaternion)
Declaration
public static NavMeshLinkInstance AddLink(NavMeshLinkData link, Vector3 position, Quaternion rotation)
Parameters
Returns
|
Improve this Doc
View Source
AddNavMeshData(NavMeshData)
Declaration
public static NavMeshDataInstance AddNavMeshData(NavMeshData navMeshData)
Parameters
Returns
|
Improve this Doc
View Source
AddNavMeshData(NavMeshData, Vector3, Quaternion)
Declaration
public static NavMeshDataInstance AddNavMeshData(NavMeshData navMeshData, Vector3 position, Quaternion rotation)
Parameters
Returns
AddOffMeshLinks()
Declaration
[Obsolete("AddOffMeshLinks has no effect and is deprecated.")]
public static void AddOffMeshLinks()
|
Improve this Doc
View Source
CalculatePath(Vector3, Vector3, Int32, NavMeshPath)
Declaration
public static bool CalculatePath(Vector3 sourcePosition, Vector3 targetPosition, int areaMask, NavMeshPath path)
Parameters
Returns
|
Improve this Doc
View Source
CalculatePath(Vector3, Vector3, NavMeshQueryFilter, NavMeshPath)
Declaration
public static bool CalculatePath(Vector3 sourcePosition, Vector3 targetPosition, NavMeshQueryFilter filter, NavMeshPath path)
Parameters
Returns
|
Improve this Doc
View Source
CalculateTriangulation()
Declaration
public static NavMeshTriangulation CalculateTriangulation()
Returns
|
Improve this Doc
View Source
CreateSettings()
Declaration
public static NavMeshBuildSettings CreateSettings()
Returns
|
Improve this Doc
View Source
FindClosestEdge(Vector3, out NavMeshHit, Int32)
Declaration
public static bool FindClosestEdge(Vector3 sourcePosition, out NavMeshHit hit, int areaMask)
Parameters
Returns
|
Improve this Doc
View Source
FindClosestEdge(Vector3, out NavMeshHit, NavMeshQueryFilter)
Declaration
public static bool FindClosestEdge(Vector3 sourcePosition, out NavMeshHit hit, NavMeshQueryFilter filter)
Parameters
Returns
GetAreaCost(Int32)
Declaration
public static float GetAreaCost(int areaIndex)
Parameters
Type |
Name |
Description |
Int32 |
areaIndex |
|
Returns
GetAreaFromName(String)
Declaration
public static int GetAreaFromName(string areaName)
Parameters
Type |
Name |
Description |
String |
areaName |
|
Returns
GetLayerCost(Int32)
Declaration
[Obsolete("Use GetAreaCost instead.")]
public static float GetLayerCost(int layer)
Parameters
Type |
Name |
Description |
Int32 |
layer |
|
Returns
GetNavMeshLayerFromName(String)
Declaration
[Obsolete("Use GetAreaFromName instead.")]
public static int GetNavMeshLayerFromName(string layerName)
Parameters
Type |
Name |
Description |
String |
layerName |
|
Returns
|
Improve this Doc
View Source
GetSettingsByID(Int32)
Declaration
public static NavMeshBuildSettings GetSettingsByID(int agentTypeID)
Parameters
Type |
Name |
Description |
Int32 |
agentTypeID |
|
Returns
|
Improve this Doc
View Source
GetSettingsByIndex(Int32)
Declaration
public static NavMeshBuildSettings GetSettingsByIndex(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Returns
GetSettingsCount()
Declaration
public static int GetSettingsCount()
Returns
GetSettingsNameFromID(Int32)
Declaration
public static string GetSettingsNameFromID(int agentTypeID)
Parameters
Type |
Name |
Description |
Int32 |
agentTypeID |
|
Returns
|
Improve this Doc
View Source
Raycast(Vector3, Vector3, out NavMeshHit, Int32)
Declaration
public static bool Raycast(Vector3 sourcePosition, Vector3 targetPosition, out NavMeshHit hit, int areaMask)
Parameters
Returns
|
Improve this Doc
View Source
Raycast(Vector3, Vector3, out NavMeshHit, NavMeshQueryFilter)
Declaration
public static bool Raycast(Vector3 sourcePosition, Vector3 targetPosition, out NavMeshHit hit, NavMeshQueryFilter filter)
Parameters
Returns
RemoveAllNavMeshData()
Declaration
public static void RemoveAllNavMeshData()
|
Improve this Doc
View Source
RemoveLink(NavMeshLinkInstance)
Declaration
public static void RemoveLink(NavMeshLinkInstance handle)
Parameters
|
Improve this Doc
View Source
RemoveNavMeshData(NavMeshDataInstance)
Declaration
public static void RemoveNavMeshData(NavMeshDataInstance handle)
Parameters
RemoveSettings(Int32)
Declaration
public static void RemoveSettings(int agentTypeID)
Parameters
Type |
Name |
Description |
Int32 |
agentTypeID |
|
RestoreNavMesh()
Declaration
[Obsolete("RestoreNavMesh has no effect and is deprecated.")]
public static void RestoreNavMesh()
|
Improve this Doc
View Source
SamplePosition(Vector3, out NavMeshHit, Single, Int32)
Declaration
public static bool SamplePosition(Vector3 sourcePosition, out NavMeshHit hit, float maxDistance, int areaMask)
Parameters
Returns
|
Improve this Doc
View Source
SamplePosition(Vector3, out NavMeshHit, Single, NavMeshQueryFilter)
Declaration
public static bool SamplePosition(Vector3 sourcePosition, out NavMeshHit hit, float maxDistance, NavMeshQueryFilter filter)
Parameters
Returns
SetAreaCost(Int32, Single)
Declaration
public static void SetAreaCost(int areaIndex, float cost)
Parameters
SetLayerCost(Int32, Single)
Declaration
[Obsolete("Use SetAreaCost instead.")]
public static void SetLayerCost(int layer, float cost)
Parameters
Triangulate(out Vector3[], out Int32[])
Declaration
[Obsolete("use NavMesh.CalculateTriangulation () instead.")]
public static void Triangulate(out Vector3[] vertices, out int[] indices)
Parameters