AgentClimb
: float |
Signature
float AgentClimb |
AgentHeight
: float |
Signature
float AgentHeight |
AgentMaxSlope
: float |
Signature
float AgentMaxSlope |
AgentRadius
: float |
Signature
float AgentRadius |
Agents
: List< NavMeshAgent > |
Signature
List<NavMeshAgent> Agents |
BuildOnSceneLoaded
: MRUK.RoomFilter |
Signature
MRUK.RoomFilter BuildOnSceneLoaded |
CollectGeometry
: NavMeshCollectGeometry |
Signature
NavMeshCollectGeometry CollectGeometry |
CollectObjects
: CollectObjects |
Signature
CollectObjects CollectObjects |
Layers
: LayerMask |
Signature
LayerMask Layers |
NavigableSurfaces
: MRUKAnchor.SceneLabels |
Signature
MRUKAnchor.SceneLabels NavigableSurfaces |
SceneObstacles
: MRUKAnchor.SceneLabels |
Signature
MRUKAnchor.SceneLabels SceneObstacles |
Obstacles
: Dictionary< MRUKAnchor, GameObject >
[Get] |
Gets a dictionary mapping MRUKAnchor objects to their corresponding GameObjects that represent obstacles in the environment.
Signature
Dictionary<MRUKAnchor, GameObject> Obstacles |
OnNavMeshInitialized
: UnityEvent
[Get] |
Event triggered when the navigation mesh has been initialized.
Signature
UnityEvent OnNavMeshInitialized |
Surfaces
: Dictionary< MRUKAnchor, GameObject >
[Get] |
Gets a dictionary mapping MRUKAnchor objects to their corresponding GameObjects that represent surfaces in the environment.
Signature
Dictionary<MRUKAnchor, GameObject> Surfaces |
BuildSceneNavMesh
()
|
Creates a navigation mesh for the entire scene.
Signature
void BuildSceneNavMesh() Returns void |
BuildSceneNavMeshForRoom
(
room
)
|
Creates a navigation mesh for the scene.
This method creates a navigation mesh by collecting geometry from the scene, building the navigation mesh data, and adding it to the NavMesh. Currently Unity does not allow the creation of custom NavMeshAgents at runtime. It also assigns the created navigation mesh to all NavMeshAgents in the scene.
Signature
void BuildSceneNavMeshForRoom(MRUKRoom room=null) Parameters room: MRUKRoomÂ
Optional parameter for the MRUKRoom to create the NavMesh for. If not provided, obstacles will be created for all rooms.
Returns void |
BuildSceneNavMeshFromExistingAgent
(
agentIndex
)
|
Creates a navigation mesh from an existing NavMeshAgent.
Signature
void BuildSceneNavMeshFromExistingAgent(int agentIndex) Parameters agentIndex: intÂ
The index of the NavMeshAgent to create the navigation mesh from.
Returns void |
ClearObstacle
(
anchor
)
|
Clears the obstacle associated with the given MRUKAnchor from the Obstacles dictionary.
Signature
void ClearObstacle(MRUKAnchor anchor) Parameters Returns void |
ClearObstacles
(
room
)
|
Clears all obstacles from the Obstacles dictionary associated with the given MRUKRoom.
If no room is specified, all obstacles are cleared.
Signature
void ClearObstacles(MRUKRoom room=null) Parameters room: MRUKRoomÂ
Optional parameter for the MRUKRoom to clear the obstacles for. If not provided, all obstacles will be cleared.
Returns void |
ClearSurface
(
anchor
)
|
Clears the surface associated with the given MRUKAnchor from the Obstacles dictionary.
Signature
void ClearSurface(MRUKAnchor anchor) Parameters Returns void |
CreateNavigableSurfaces
(
room
)
|
Creates navigable surfaces for the given MRUKRoom or all rooms if no room is specified.
Creating surfaces will not automatically build a new NavMesh. When changing surfaces at run time, always use BuildSceneNavMesh method
Signature
void CreateNavigableSurfaces(MRUKRoom room=null) Parameters room: MRUKRoomÂ
Optional parameter for the MRUKRoom to create the navigable surfaces for. If not provided, navigable surfaces will be created for all rooms.
Returns void |
CreateNavMeshBuildSettings
(
agentRadius
, agentHeight
, agentMaxSlope
, agentClimb
)
|
Creates a new NavMeshBuildSettings object with the specified agent properties.
Signature
NavMeshBuildSettings CreateNavMeshBuildSettings(float agentRadius, float agentHeight, float agentMaxSlope, float agentClimb) Parameters agentRadius: floatÂ
The minimum distance to the walls where the navigation mesh can exist.
agentHeight: floatÂ
How much vertical clearance space must exist.
agentMaxSlope: floatÂ
Maximum slope the agent can walk up.
agentClimb: floatÂ
The height of discontinuities in the level the agent can climb over (i.e. steps and stairs).
Returns NavMeshBuildSettingsÂ
A new NavMeshBuildSettings object with the specified agent properties.
|
CreateNavMeshSurface
()
|
Creates a NavMeshSurface component and sets its properties.
Signature
void CreateNavMeshSurface() Returns void |
CreateObstacle
(
anchor
, shouldCarve
, carveOnlyStationary
, carvingTimeToStationary
, carvingMoveThreshold
)
|
Creates a NavMeshObstacle for the given MRUKAnchor.
Signature
void CreateObstacle(MRUKAnchor anchor, bool shouldCarve=true, bool carveOnlyStationary=true, float carvingTimeToStationary=0.2f, float carvingMoveThreshold=0.2f) Parameters shouldCarve: boolÂ
Optional parameter that determines whether the obstacle should carve the NavMesh. Default is true.
carveOnlyStationary: boolÂ
Optional parameter that determines whether the obstacle should only carve the NavMesh when stationary. Default is true.
carvingTimeToStationary: floatÂ
Optional parameter that sets the time in seconds an obstacle must be stationary before it starts carving the NavMesh. Default is 0.2f.
carvingMoveThreshold: floatÂ
Optional parameter that sets the minimum world space distance the obstacle must move before it is considered moving. Default is 0.2f.
Returns void |
CreateObstacles
(
room
)
|
Creates obstacles for the given MRUKRoom or all rooms if no room is specified.
Signature
void CreateObstacles(MRUKRoom room=null) Parameters room: MRUKRoomÂ
Optional parameter for the MRUKRoom to create the obstacles for. If not provided, obstacles will be created for all rooms.
Returns void |
RemoveNavMeshData
()
|
Removes the NavMeshData from the NavMeshSurface component.
Signature
void RemoveNavMeshData() Returns void |
ResizeNavMeshFromRoomBounds
(
surface
, room
)
|
Resizes the NavMeshSurface to fit the room bounds.
Signature
Bounds ResizeNavMeshFromRoomBounds(ref NavMeshSurface surface, MRUKRoom room=null) Parameters surface: ref NavMeshSurfaceÂ
The NavMeshSurface to resize.
Returns BoundsÂ
The bounds of the resized NavMeshSurface.
|
ToggleGlobalMeshNavigation
(
useGlobalMesh
, agentTypeID
)
|
Toggles the use of global mesh for navigation.
Signature
void ToggleGlobalMeshNavigation(bool useGlobalMesh, int agentTypeID=-1) Parameters useGlobalMesh: boolÂ
Whether to use the global mesh to build the NavMesh
agentTypeID: intÂ
The agent type ID to use for creating the scene nav mesh, if not specified, a new agent will be created.
Returns void |
GetFirstLayerFromLayerMask
(
layerMask
)
|
Gets the first layer included in the given LayerMask.
Signature
static int GetFirstLayerFromLayerMask(LayerMask layerMask) Parameters layerMask: LayerMaskÂ
The LayerMask to get the first layer from.
Returns intÂ
Returns the first layer included in the LayerMask.
|
ValidateBuildSettings
(
navMeshBuildSettings
, navMeshBounds
)
|
Validates the provided NavMeshBuildSettings against the provided NavMeshBounds.
Signature
static bool ValidateBuildSettings(NavMeshBuildSettings navMeshBuildSettings, Bounds navMeshBounds) Parameters navMeshBuildSettings: NavMeshBuildSettingsÂ
The NavMeshBuildSettings to validate.
navMeshBounds: BoundsÂ
The Bounds to validate the NavMeshBuildSettings against.
Returns boolÂ
Returns true if the NavMeshBuildSettings are valid, false otherwise.
|