-
Notifications
You must be signed in to change notification settings - Fork 0
MeshFilter Extensions
Andrzej Kebab edited this page Jan 23, 2024
·
1 revision
This utility library, part of the MeshFilterExtensions namespace, provides an extension method for Unity's MeshFilter class, offering additional functionality for obtaining the bounds of a mesh filter.
Gets the bounds of the MeshFilter. If includeChildren is set to true, the bounds encapsulate the bounds of child mesh filters.
// Example usage
MeshFilter myMeshFilter = /* Instantiate or reference a MeshFilter */;
Bounds bounds = myMeshFilter.GetBounds();
Debug.Log($"Bounds of the MeshFilter: {bounds}");Parameters:
-
meshFilter(MeshFilter): The mesh filter to get the bounds from. -
includeChildren(bool): Whether to include the bounds of child mesh filters. Default is true.
Returns:
- Bounds: The bounds of the
MeshFilter. IfincludeChildrenis true, the bounds encapsulate the bounds of child mesh filters.