Language
Edit

BoundsExtensions.GetScaleToMatchBounds(Bounds, Bounds, Vector3) Method

Definition

Calculates how much scale is required for this UnityEngine.Bounds to match another UnityEngine.Bounds.

public static UnityEngine.Vector3 GetScaleToMatchBounds(this UnityEngine.Bounds bounds, UnityEngine.Bounds otherBounds, UnityEngine.Vector3 padding = default);
static member GetScaleToMatchBounds : UnityEngine.Bounds * UnityEngine.Bounds * UnityEngine.Vector3 -> UnityEngine.Vector3
<Extension()>
Public Function GetScaleToMatchBounds (bounds As Bounds, otherBounds As Bounds, Optional padding As Vector3 = Nothing) As Vector3

Parameters

bounds
UnityEngine.Bounds

The bounds structure to examine.

otherBounds
UnityEngine.Bounds

Object representation to be scaled to

padding
UnityEngine.Vector3

padding multiplied into another bounds

Returns

UnityEngine.Vector3

Scale represented as a 3D position.

Applies to