Modifier

Partager via


RectTransformCubeScaler Class

Definition

RectTransforms do not scale 3d objects (such as unit cubes) to fit within their bounds. This helper class will apply a scale to fit a unit cube into the bounds specified by the RectTransform. The Z component is scaled to the min of the X and Y components.

public ref class RectTransformCubeScaler : UnityEngine::MonoBehaviour
[UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/RectTransformCubeScaler")]
[UnityEngine.ExecuteInEditMode]
[UnityEngine.RequireComponent(typeof(UnityEngine.RectTransform))]
public class RectTransformCubeScaler : UnityEngine.MonoBehaviour
[<UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/RectTransformCubeScaler")>]
[<UnityEngine.ExecuteInEditMode>]
[<UnityEngine.RequireComponent(typeof(UnityEngine.RectTransform))>]
type RectTransformCubeScaler = class
    inherit MonoBehaviour
Public Class RectTransformCubeScaler
Inherits MonoBehaviour
Inheritance
UnityEngine.MonoBehaviour
RectTransformCubeScaler
Attributes
UnityEngine.AddComponentMenuAttribute UnityEngine.ExecuteInEditModeAttribute UnityEngine.RequireComponentAttribute

Constructors

RectTransformCubeScaler()

Applies to