ButtonLayout Class

Definition

Place an object in space relative to another object's scale Good for responsive buttons that can stretch and object realign

C++
public ref class ButtonLayout : UnityEngine::MonoBehaviour
Inheritance
UnityEngine.MonoBehaviour
ButtonLayout
Attributes
UnityEngine.AddComponentMenuAttribute UnityEngine.ExecuteInEditModeAttribute

Constructors

Fields

Alignment

Where to set this object's center point in relation to the Anchor's center point.

Anchor

The transform this object should be linked and aligned to.

AnchorOffset

Offset this object's position based on the same pixel based size ratio.

BasePixelSize

A pixel to Unity unit conversion, Default: 2048x2048 pixels covers a 1x1 Unity Unit or default primitive size.

OnlyInEditMode

Methods

Awake()

A transform is required for alignment

Update()
UpdatePosition()

Set this object's position

Applies to

Toode Versioonid
MRTK2 Unity 2018 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0
MRTK2 Unity 2019 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0
MRTK2 Unity 2020 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0