Class ButtonLayout
Place an object in space relative to another object's scale Good for responsive buttons that can stretch and object realign
Namespace: Microsoft.MixedReality.Toolkit.UI
Assembly: cs.temp.dll.dll
Syntax
public class ButtonLayout : MonoBehaviour
Fields
Alignment
Where to set this object's center point in relation to the Anchor's center point.
Declaration
public Vector3 Alignment
Field Value
Type | Description |
---|---|
Vector3 |
Anchor
The transform this object should be linked and aligned to.
Declaration
public Transform Anchor
Field Value
Type | Description |
---|---|
Transform |
AnchorOffset
Offset this object's position based on the same pixel based size ratio.
Declaration
public Vector3 AnchorOffset
Field Value
Type | Description |
---|---|
Vector3 |
BasePixelSize
A pixel to Unity unit conversion, Default: 2048x2048 pixels covers a 1x1 Unity Unit or default primitive size.
Declaration
public float BasePixelSize
Field Value
Type | Description |
---|---|
Single |
OnlyInEditMode
Declaration
public bool OnlyInEditMode
Field Value
Type | Description |
---|---|
Boolean |
Methods
Awake()
A transform is required for alignment
Declaration
protected virtual void Awake()
Update()
Declaration
protected virtual void Update()
UpdatePosition()
Set this object's position
Declaration
protected virtual void UpdatePosition()