BoundsExtensions.GetColliderBounds(GameObject, Bounds, LayerMask) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Method to get bounds using collider method.
public:
static bool GetColliderBounds(UnityEngine::GameObject ^ target, [Runtime::InteropServices::Out] UnityEngine::Bounds % bounds, UnityEngine::LayerMask ignoreLayers);
public static bool GetColliderBounds (UnityEngine.GameObject target, out UnityEngine.Bounds bounds, UnityEngine.LayerMask ignoreLayers);
static member GetColliderBounds : UnityEngine.GameObject * Bounds * UnityEngine.LayerMask -> bool
Public Function GetColliderBounds (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 colliders in a gameObject hierarchy.
- ignoreLayers
- UnityEngine.LayerMask
A LayerMask to restrict the colliders selected.
Returns
True if bounds were calculated, if zero colliders are present bounds will not be calculated.