BoundsExtensions.GetScaleToMatchBounds(Bounds, Bounds, Vector3) Method
Definition
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.
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