Skip to content

Api > NavMesh > AddNavMeshData()


NavMesh.AddNavMeshData(NavMeshData navMeshData, Vector3 position, Quaternion rotation)⚓︎

Adds the specified NavMeshData to the game.

Parameters:⚓︎

Name Type Description
navMeshData NavMeshData Contains the data for the navmesh.
position Vector3 Translate the navmesh to this position.
rotation Quaternion Rotate the navmesh to this orientation.

Returns:⚓︎

type Description
NavMeshDataInstance Representing the added navmesh.

Usage⚓︎

---@type NavMeshData
local navMeshData;

---@type Vector3
local position;

---@type Quaternion
local rotation;


local val0 = NavMesh:AddNavMeshData(navMeshData, position, rotation)

Extra Detail⚓︎

This function is similar to AddNavMeshData above, but the position and rotation specified is applied in addition to the position and rotation where the NavMesh data was baked.