Modifier

Partager via


BoundsExtensions.GetScaleToMatchBounds(Bounds, Bounds, Vector3) Method

Definition

Calculates how much scale is required for this Bounds to match another 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
otherBounds
UnityEngine.Bounds

Object representation to be scaled to

padding
UnityEngine.Vector3

padding multiplied into another bounds

Returns

UnityEngine.Vector3

Scale represented as a Vector3

Applies to