Class NavMeshSurface
Component used for building and enabling a NavMesh surface for one agent type.
Inherited Members
Namespace: Unity.AI.Navigation
Assembly: solution.dll
Syntax
[ExecuteAlways]
[DefaultExecutionOrder(-102)]
[AddComponentMenu("Navigation/NavMeshSurface", 30)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.ai.navigation@1.1/manual/NavMeshSurface.html")]
public class NavMeshSurface : MonoBehaviour
Properties
Name | Description |
---|---|
activeSurfaces | Gets the list of all the NavMeshSurface components that are currently active in the scene. |
agentTypeID | Gets or sets the identifier of the agent type that will use this NavMesh Surface. |
buildHeightMesh | Gets or sets whether the NavMesh building process produces more detailed elevation information. |
center | Gets or sets the center position of the volume that delimits the NavMesh created by this component. |
collectObjects | Gets or sets the method for retrieving the objects that will be used for baking. |
defaultArea | Gets or sets the area type assigned to any object that does not have one specified. |
ignoreNavMeshAgent | Gets or sets whether the process of building the NavMesh ignores the GameObjects containing a NavMeshAgent component. |
ignoreNavMeshObstacle | Gets or sets whether the process of building the NavMesh ignores the GameObjects containing a NavMeshObstacle component. |
layerMask | Gets or sets a bitmask representing which layers to consider when selecting the objects that will be used for baking the NavMesh. |
minRegionArea | Gets or sets the minimum acceptable surface area of any continuous portion of the NavMesh. |
navMeshData | Gets or sets the reference to the NavMesh data instantiated by this surface. |
overrideTileSize | Gets or sets whether the NavMesh building process uses the tileSize value. |
overrideVoxelSize | Gets or sets whether the NavMesh building process uses the voxelSize value. |
size | Gets or sets the size of the volume that delimits the NavMesh created by this component. |
tileSize | Gets or sets the width of the square grid of voxels that the NavMesh building process uses for sampling the scene geometry. |
useGeometry | Gets or sets which type of component in the GameObjects provides the geometry used for baking the NavMesh. |
voxelSize | Gets or sets the width of the square voxels that the NavMesh building process uses for sampling the scene geometry. |
Methods
Name | Description |
---|---|
AddData() | Creates an instance of the NavMesh data and activates it in the navigation system. |
BuildNavMesh() | Builds and instantiates this NavMesh surface. |
GetBuildSettings() | Retrieves a copy of the current settings chosen for building this NavMesh surface. |
RemoveData() | Removes the instance of this NavMesh data from the navigation system. |
UpdateNavMesh(NavMeshData) | Rebuilds parts of an existing NavMesh in the regions of the scene where the objects have changed. |