Class ContentSizeFitter
Inherited Members
UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
UnityEngine.Object.FindFirstObjectByType<T>()
UnityEngine.Object.FindAnyObjectByType<T>()
UnityEngine.Object.FindFirstObjectByType<T>(UnityEngine.FindObjectsInactive)
UnityEngine.Object.FindAnyObjectByType<T>(UnityEngine.FindObjectsInactive)
Namespace: UnityEngine.UI
Syntax
[AddComponentMenu("Layout/Content Size Fitter", 141)]
[ExecuteAlways]
[RequireComponent(typeof(RectTransform))]
public class ContentSizeFitter : UIBehaviour, ILayoutSelfController, ILayoutController
Constructors
ContentSizeFitter()
Declaration
protected ContentSizeFitter()
Fields
m_HorizontalFit
Declaration
[SerializeField]
protected ContentSizeFitter.FitMode m_HorizontalFit
Field Value
Type | Description |
---|---|
ContentSizeFitter.FitMode |
m_VerticalFit
Declaration
[SerializeField]
protected ContentSizeFitter.FitMode m_VerticalFit
Field Value
Type | Description |
---|---|
ContentSizeFitter.FitMode |
Properties
horizontalFit
The fit mode to use to determine the width.
Declaration
public ContentSizeFitter.FitMode horizontalFit { get; set; }
Property Value
Type | Description |
---|---|
ContentSizeFitter.FitMode |
verticalFit
The fit mode to use to determine the height.
Declaration
public ContentSizeFitter.FitMode verticalFit { get; set; }
Property Value
Type | Description |
---|---|
ContentSizeFitter.FitMode |
Methods
OnDisable()
Declaration
protected override void OnDisable()
Overrides
OnEnable()
Declaration
protected override void OnEnable()
Overrides
OnRectTransformDimensionsChange()
Declaration
protected override void OnRectTransformDimensionsChange()
Overrides
SetDirty()
Declaration
protected void SetDirty()
SetLayoutHorizontal()
Calculate and apply the horizontal component of the size to the RectTransform
Declaration
public virtual void SetLayoutHorizontal()
Implements
SetLayoutVertical()
Calculate and apply the vertical component of the size to the RectTransform
Declaration
public virtual void SetLayoutVertical()