Bewerken

Delen via


PinchSliderBox Class

Definition

Manages and creates sliders to allow for non-uniform scaling of a box along multiple axes. The MinMaxScaleConstraint is used to control the target of the scale and scale constraints.

public ref class PinchSliderBox : UnityEngine::MonoBehaviour
[UnityEngine.RequireComponent(typeof(Microsoft.MixedReality.Toolkit.UI.MinMaxScaleConstraint))]
public class PinchSliderBox : UnityEngine.MonoBehaviour
[<UnityEngine.RequireComponent(typeof(Microsoft.MixedReality.Toolkit.UI.MinMaxScaleConstraint))>]
type PinchSliderBox = class
    inherit MonoBehaviour
Public Class PinchSliderBox
Inherits MonoBehaviour
Inheritance
UnityEngine.MonoBehaviour
PinchSliderBox
Attributes
UnityEngine.RequireComponentAttribute

Constructors

PinchSliderBox()

Properties

CreateSlidersOnEnable

Should sliders be auto-created when this component is enabled?

CreateXAxisSliders

Should sliders be created for manipulating scale on the 'X' axis?

CreateYAxisSliders

Should sliders be created for manipulating scale on the 'Y' axis?

CreateZAxisSliders

Should sliders be created for manipulating scale on the 'Z' axis?

HightlightPrefab

The prefab use to demonstrate which axis of the box is being manipulated.

ThumbPrefab

The prefab to spawn for slider thumb visualization.

Methods

CreateSliders()

Creates sliders for each requested axis of the box. A pivot object is also created and made the parent of the MinMaxScaleConstraint TargetTransform.

DestroyHandles()

Destroys all sliders created with CreateSliders and restores the MinMaxScaleConstraint's TargetTransform's parent.

Applies to