اقرأ باللغة الإنجليزية تحرير

مشاركة عبر


BoundsExtensions.GetRenderBounds(GameObject, Bounds, LayerMask) Method

Definition

Get the bounds using UnityEngine.Renderer methods.

C#
public static bool GetRenderBounds (UnityEngine.GameObject target, out UnityEngine.Bounds bounds, UnityEngine.LayerMask ignoreLayers);

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.

Applies to

منتج الإصدارات
MRTK3 Core Definitions 3.0, 3.1, 3.2