BoundsExtensions.GetScaleToFitInside(Bounds, Bounds) 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 fit inside another bounds without stretching.
public:
[System::Runtime::CompilerServices::Extension]
static float GetScaleToFitInside(UnityEngine::Bounds bounds, UnityEngine::Bounds containerBounds);
public static float GetScaleToFitInside (this UnityEngine.Bounds bounds, UnityEngine.Bounds containerBounds);
static member GetScaleToFitInside : UnityEngine.Bounds * UnityEngine.Bounds -> single
<Extension()>
Public Function GetScaleToFitInside (bounds As Bounds, containerBounds As Bounds) As Single
Parameters
- bounds
- UnityEngine.Bounds
- containerBounds
- UnityEngine.Bounds
The bounds of the container we're trying to fit this object.
Returns
A single scale factor that can be applied to this object to fit inside the container.