Bearbeiten

ButtonLayout Class

Definition

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

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

Constructors

ButtonLayout()

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