BoundsExtensions.GetRenderBounds(GameObject, Bounds, LayerMask) Method
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.
C#
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
- 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.
true
if bounds were calculated, otherwise false
.
If zero UnityEngine.Renderer objects are present, that bounds will not be calculated.
منتج | الإصدارات |
---|---|
MRTK3 Core Definitions | 3.0, 3.1, 3.2 |