Component.GetComponentIndex()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, InstantiateParameters)
Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate(Object, Scene)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.UI Assembly: UnityEngine.UI.dll Syntax[DisallowMultipleComponent]
[ExecuteAlways]
[RequireComponent(typeof(RectTransform))]
public abstract class LayoutGroup : UIBehaviour, ILayoutElement, ILayoutGroup, ILayoutController
Constructors LayoutGroup() Declaration Fields m_ChildAlignment Declaration
[SerializeField]
protected TextAnchor m_ChildAlignment
Field Value m_Padding Declaration
[SerializeField]
protected RectOffset m_Padding
Field Value m_Tracker Declaration
protected DrivenRectTransformTracker m_Tracker
Field Value Properties childAlignment
The alignment to use for the child layout elements in the layout group.
Declarationpublic TextAnchor childAlignment { get; set; }
Property Value flexibleHeight
See LayoutElement.flexibleHeight
Declarationpublic virtual float flexibleHeight { get; }
Property Value flexibleWidth
See LayoutElement.flexibleWidth
Declarationpublic virtual float flexibleWidth { get; }
Property Value layoutPriority
See LayoutElement.layoutPriority
Declarationpublic virtual int layoutPriority { get; }
Property Value minHeight
See LayoutElement.minHeight
Declarationpublic virtual float minHeight { get; }
Property Value minWidth
See LayoutElement.minWidth
Declarationpublic virtual float minWidth { get; }
Property Value padding
The padding to add around the child layout elements.
Declarationpublic RectOffset padding { get; set; }
Property Value preferredHeight
See LayoutElement.preferredHeight
Declarationpublic virtual float preferredHeight { get; }
Property Value preferredWidth
See LayoutElement.preferredWidth
Declarationpublic virtual float preferredWidth { get; }
Property Value rectChildren Declaration
protected List<RectTransform> rectChildren { get; }
Property Value rectTransform Declaration
protected RectTransform rectTransform { get; }
Property Value Methods CalculateLayoutInputHorizontal()
After this method is invoked, layout horizontal input properties should return up-to-date values. Children will already have up-to-date layout horizontal inputs when this methods is called.
Declarationpublic virtual void CalculateLayoutInputHorizontal()
CalculateLayoutInputVertical()
After this method is invoked, layout vertical input properties should return up-to-date values. Children will already have up-to-date layout vertical inputs when this methods is called.
Declarationpublic abstract void CalculateLayoutInputVertical()
GetAlignmentOnAxis(int)
Returns the alignment on the specified axis as a fraction where 0 is left/top, 0.5 is middle, and 1 is right/bottom.
Declarationprotected float GetAlignmentOnAxis(int axis)
Parameters Type Name Description int axis
The axis to get alignment along. 0 is horizontal and 1 is vertical.
Returns Type Description floatThe alignment as a fraction where 0 is left/top, 0.5 is middle, and 1 is right/bottom.
GetStartOffset(int, float)Returns the calculated position of the first child layout element along the given axis.
Declarationprotected float GetStartOffset(int axis, float requiredSpaceWithoutPadding)
Parameters Type Name Description int axis
The axis index. 0 is horizontal and 1 is vertical.
float requiredSpaceWithoutPaddingThe total space required on the given axis for all the layout elements including spacing and excluding padding.
Returns Type Description floatThe position of the first child along the given axis.
GetTotalFlexibleSize(int)The flexible size for the layout group on the given axis.
Declarationprotected float GetTotalFlexibleSize(int axis)
Parameters Type Name Description int axis
The axis index. 0 is horizontal and 1 is vertical.
Returns Type Description floatThe flexible size
GetTotalMinSize(int)The min size for the layout group on the given axis.
Declarationprotected float GetTotalMinSize(int axis)
Parameters Type Name Description int axis
The axis index. 0 is horizontal and 1 is vertical.
Returns Type Description floatThe min size
GetTotalPreferredSize(int)The preferred size for the layout group on the given axis.
Declarationprotected float GetTotalPreferredSize(int axis)
Parameters Type Name Description int axis
The axis index. 0 is horizontal and 1 is vertical.
Returns Type Description floatThe preferred size.
OnDidApplyAnimationProperties()Callback for when properties have been changed by animation.
Declarationprotected override void OnDidApplyAnimationProperties()
Overrides OnDisable() Declaration
protected override void OnDisable()
Overrides OnEnable() Declaration
protected override void OnEnable()
Overrides OnRectTransformDimensionsChange()
This callback is called when the dimensions of an associated RectTransform change. It is always called before Awake, OnEnable, or Start. The call is also made to all child RectTransforms, regardless of whether their dimensions change (which depends on how they are anchored).
Declarationprotected override void OnRectTransformDimensionsChange()
Overrides OnTransformChildrenChanged() Declaration
protected virtual void OnTransformChildrenChanged()
OnValidate() Declaration
protected override void OnValidate()
Overrides SetChildAlongAxis(RectTransform, int, float)
Set the position and size of a child layout element along the given axis.
Declarationprotected void SetChildAlongAxis(RectTransform rect, int axis, float pos)
Parameters Type Name Description RectTransform rect
The RectTransform of the child layout element.
int axisThe axis to set the position and size along. 0 is horizontal and 1 is vertical.
float posThe position from the left side or top.
SetChildAlongAxis(RectTransform, int, float, float)Set the position and size of a child layout element along the given axis.
Declarationprotected void SetChildAlongAxis(RectTransform rect, int axis, float pos, float size)
Parameters Type Name Description RectTransform rect
The RectTransform of the child layout element.
int axisThe axis to set the position and size along. 0 is horizontal and 1 is vertical.
float posThe position from the left side or top.
float sizeThe size.
SetChildAlongAxisWithScale(RectTransform, int, float, float)Set the position and size of a child layout element along the given axis.
Declarationprotected void SetChildAlongAxisWithScale(RectTransform rect, int axis, float pos, float scaleFactor)
Parameters Type Name Description RectTransform rect
The RectTransform of the child layout element.
int axisThe axis to set the position and size along. 0 is horizontal and 1 is vertical.
float posThe position from the left side or top.
float scaleFactor SetChildAlongAxisWithScale(RectTransform, int, float, float, float)Set the position and size of a child layout element along the given axis.
Declarationprotected void SetChildAlongAxisWithScale(RectTransform rect, int axis, float pos, float size, float scaleFactor)
Parameters Type Name Description RectTransform rect
The RectTransform of the child layout element.
int axisThe axis to set the position and size along. 0 is horizontal and 1 is vertical.
float posThe position from the left side or top.
float sizeThe size.
float scaleFactor SetDirty()Mark the LayoutGroup as dirty.
Declarationprotected void SetDirty()
SetLayoutHorizontal()
Callback invoked by the auto layout system which handles horizontal aspects of the layout.
Declarationpublic abstract void SetLayoutHorizontal()
SetLayoutInputForAxis(float, float, float, int)
Used to set the calculated layout properties for the given axis.
Declarationprotected void SetLayoutInputForAxis(float totalMin, float totalPreferred, float totalFlexible, int axis)
Parameters Type Name Description float totalMin
The min size for the layout group.
float totalPreferredThe preferred size for the layout group.
float totalFlexibleThe flexible size for the layout group.
int axisThe axis to set sizes for. 0 is horizontal and 1 is vertical.
SetLayoutVertical()Callback invoked by the auto layout system which handles vertical aspects of the layout.
Declarationpublic abstract void SetLayoutVertical()
SetProperty<T>(ref T, T)
Helper method used to set a given property if it has changed.
Declarationprotected void SetProperty<T>(ref T currentValue, T newValue)
Parameters Type Name Description T currentValue
A reference to the member value.
T newValueThe new value.
Type Parameters ImplementsRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4