Description
The IncludedBodies
property of the NavMesh
class specifies a set of tags that determine which bodies should be included in the navigation mesh generation process. If this property is set, only bodies with the specified tags will be considered for inclusion in the navigation mesh.
Usage
To use the IncludedBodies
property, assign it a TagSet
containing the tags of the bodies you want to include in the navigation mesh generation. This is useful for filtering which objects in the scene should be considered when generating the navigation mesh, allowing for more precise control over the navigation environment.
Example
// Example of setting the IncludedBodies property
NavMesh navMesh = new NavMesh();
navMesh.IncludedBodies = new TagSet { "Player", "NPC" };
// This will ensure that only bodies tagged with "Player" or "NPC" are included
// in the navigation mesh generation process.