Class NavmeshAdd Extends NavmeshClipper

Public

Adds new geometry to a recast graph.

This component will add new geometry to a recast graph similar to how a NavmeshCut component removes it.

There are quite a few limitations to this component though. This navmesh geometry will not be connected to the rest of the navmesh in the same tile unless very exactly positioned so that the triangles line up exactly. It will be connected to neighbouring tiles if positioned so that it lines up with the tile border.

This component has a few very specific use-cases. For example if you have a tiled recast graph this component could be used to add bridges in that world. You would create a NavmeshCut object cutting out a hole for the bridge. then add a NavmeshAdd object which fills that space. Make sure NavmeshCut.CutsAddedGeom is disabled on the NavmeshCut, otherwise it will cut away the NavmeshAdd object. Then you can add links between the added geometry and the rest of the world, preferably using NodeLink3.

Public Methods

DrawGizmos ()
Public
ForceUpdate ()

Forces this navmesh add to update the navmesh.

Public
GetBounds (inverseTransform, radiusMargin)

Bounds in XZ space after transforming using the *inverse* transform of the inverseTransform parameter.

Public
GetMesh (vbuffer, tbuffer, inverseTransform=null)

Copy the mesh to the vertex and triangle buffers after the vertices have been transformed using the inverse of the inverseTransform parameter.

Public
RebuildMesh ()
Public
RequiresUpdate (previousState)

Returns true if this object has moved so much that it requires an update.

Public

Public Variables

Center
Public
center
Public
mesh

Custom mesh to use.

Public
meshScale
Public
rectangleSize

Size of the rectangle.

Public
type
Public
updateDistance

Distance between positions to require an update of the navmesh.

Public
updateRotationDistance

How many degrees rotation that is required for an update to the navmesh.

Public
useRotationAndScale

Includes rotation and scale in calculations.

Public

Public Static Variables

GizmoColor
Public Static Readonly
gizmoBuffer
Public Static

Public Enums

MeshType
Public

Inherited Public Members

AddEnableCallback (onEnable, onDisable)
Public Static
RemoveEnableCallback (onEnable, onDisable)
Public Static
allEnabled

All navmesh clipper components in the scene.

Public Static
graphMask

Which graphs that are affected by this component.

Public

Private/Protected Members

Awake ()
Protected
NotifyUpdated (previousState)

Internal method to notify the NavmeshAdd that it has just been used to update the navmesh.

Internal
OnDisable ()
Protected
OnEnable ()
Protected
OnUpgradeSerializedData (migrations, unityThread)

Handle serialization backwards compatibility.

Protected
Reset ()

Handle serialization backwards compatibility.

Protected
UpgradeSerializedData (isUnityThread)
Protected
tr

cached transform component

Protected
tris

Cached triangles.

Private
verts

Cached vertices.

Private