docs.unity.cn
    Show / Hide Table of Contents

    Class BoundsUtils

    Bounds related utilities

    Inheritance
    Object
    BoundsUtils
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.XR.CoreUtils
    Syntax
    public static class BoundsUtils

    Methods

    GetBounds(List<GameObject>)

    Get the aggregated bounds of a list of GameObjects and their children.

    Declaration
    public static Bounds GetBounds(List<GameObject> gameObjects)
    Parameters
    Type Name Description
    List<GameObject> gameObjects

    The list of GameObjects.

    Returns
    Type Description
    Bounds

    The aggregated bounds.

    GetBounds(List<Renderer>)

    Get the aggregated bounds of a list of renderers.

    Declaration
    public static Bounds GetBounds(List<Renderer> renderers)
    Parameters
    Type Name Description
    List<Renderer> renderers

    The list of renderers.

    Returns
    Type Description
    Bounds

    The aggregated bounds.

    GetBounds(List<Vector3>)

    Gets the bounds that encapsulate a list of points.

    Declaration
    public static Bounds GetBounds(List<Vector3> points)
    Parameters
    Type Name Description
    List<Vector3> points

    The list of points to encapsulate.

    Returns
    Type Description
    Bounds

    The aggregated bounds.

    GetBounds(Transform)

    Get the aggregated bounds of a transform and its children.

    Declaration
    public static Bounds GetBounds(Transform transform)
    Parameters
    Type Name Description
    Transform transform

    The transform.

    Returns
    Type Description
    Bounds

    The aggregated bounds.

    GetBounds(Transform[])

    Get the aggregated bounds of an array of transforms and their children.

    Declaration
    public static Bounds GetBounds(Transform[] transforms)
    Parameters
    Type Name Description
    Transform[] transforms

    The array of transforms.

    Returns
    Type Description
    Bounds

    The aggregated bounds.

    GetBounds<T>(List<T>)

    Get the aggregated bounds of a list of colliders.

    Declaration
    public static Bounds GetBounds<T>(List<T> colliders)
        where T : Collider
    Parameters
    Type Name Description
    List<T> colliders

    The list of colliders.

    Returns
    Type Description
    Bounds

    The aggregated bounds.

    Type Parameters
    Name Description
    T

    The type of object in the list of colliders.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Thursday, May 4, 2023