BoundsExtensions.GetMeshFilterBounds(GameObject, Bounds, LayerMask) Method

Definition

Method to get bounds using mesh filters method.

public:
 static bool GetMeshFilterBounds(UnityEngine::GameObject ^ target, [Runtime::InteropServices::Out] UnityEngine::Bounds % bounds, UnityEngine::LayerMask ignoreLayers);
public static bool GetMeshFilterBounds (UnityEngine.GameObject target, out UnityEngine.Bounds bounds, UnityEngine.LayerMask ignoreLayers);
static member GetMeshFilterBounds : UnityEngine.GameObject * Bounds * UnityEngine.LayerMask -> bool
Public Function GetMeshFilterBounds (target As GameObject, ByRef bounds As Bounds, ignoreLayers As LayerMask) As Boolean

Parameters

target
UnityEngine.GameObject

GameObject to generate the bounds around.

bounds
UnityEngine.Bounds

An AABB in world space around all the mesh filters in a GameObject hierarchy.

ignoreLayers
UnityEngine.LayerMask

A LayerMask to restrict the colliders selected.

Returns

True if bounds were calculated, if zero mesh filters are present bounds will not be calculated.

Applies to