BoundsExtensions.GetRenderBounds(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.
Get the bounds using UnityEngine.Renderer methods.
public static bool GetRenderBounds(UnityEngine.GameObject target, out UnityEngine.Bounds bounds, UnityEngine.LayerMask ignoreLayers);
static member GetRenderBounds : UnityEngine.GameObject * Bounds * UnityEngine.LayerMask -> bool
Public Function GetRenderBounds (target As GameObject, ByRef bounds As Bounds, ignoreLayers As LayerMask) As Boolean
Parameters
- target
- UnityEngine.GameObject
A game object to generate the bounds around.
- bounds
- UnityEngine.Bounds
A bounds in world space around all the renderers in a game object hierarchy.
- ignoreLayers
- UnityEngine.LayerMask
A LayerMask to restrict the colliders selected.
Returns
true if bounds were calculated, otherwise false.
Remarks
If zero UnityEngine.Renderer objects are present, that bounds will not be calculated.