編輯

共用方式為


PressableButtonHoloLens2 Class

Definition

HoloLens 2 shell's style button specific elements

public ref class PressableButtonHoloLens2 : Microsoft::MixedReality::Toolkit::UI::PressableButton
[UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/PressableButtonHoloLens2")]
public class PressableButtonHoloLens2 : Microsoft.MixedReality.Toolkit.UI.PressableButton
[<UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/PressableButtonHoloLens2")>]
type PressableButtonHoloLens2 = class
    inherit PressableButton
Public Class PressableButtonHoloLens2
Inherits PressableButton
Inheritance
UnityEngine.MonoBehaviour
PressableButtonHoloLens2
Attributes
UnityEngine.AddComponentMenuAttribute

Constructors

PressableButtonHoloLens2()

Fields

ButtonPressed (Inherited from PressableButton)
ButtonReleased (Inherited from PressableButton)
movingButtonVisuals

The object that is being pushed.

(Inherited from PressableButton)
startPushDistance (Inherited from PressableButton)
TouchBegin (Inherited from PressableButton)
TouchEnd (Inherited from PressableButton)

Properties

CompressableButtonVisuals

The visuals which become compressed (scaled) along the z-axis when pressed.

CurrentPushDistance

Current push distance relative to the start push plane.

(Inherited from PressableButton)
DistanceSpaceMode

Describes in which coordinate space the plane distances are stored and calculated

(Inherited from PressableButton)
EnforceFrontPush

Ensures that the button can only be pushed from the front. Touching the button from the back or side is prevented.

(Inherited from PressableButton)
IsPressing

Represents the state of whether the button is currently being pressed.

(Inherited from PressableButton)
IsTouching

Represents the state of whether or not a finger is currently touching this button.

(Inherited from PressableButton)
LocalToWorldScale

Transform for local to world space in the world direction of a press Multiply local scale positions by this value to convert to world space

(Inherited from PressableButton)
MaxPushDistance

Maximum push distance. Distance is relative to the pivot of either the moving visuals if there's any or the button itself.

(Inherited from PressableButton)
MinCompressPercentage

The minimum percentage of the original scale the compressableButtonVisuals can be compressed to.

MovingButtonIconText

Public property to set the moving content part(icon and text) of the button. This content part moves 1/2 distance of the front cage

PressDistance

Distance the button must be pushed until it is considered pressed. Distance is relative to the pivot of either the moving visuals if there's any or the button itself.

(Inherited from PressableButton)
ReleaseDistanceDelta

Withdraw amount needed to transition from Pressed to Released.

(Inherited from PressableButton)
ReleaseOnTouchEnd

Button will send the release event on touch end after successful press even if release plane hasn't been passed.

(Inherited from PressableButton)
StartPushDistance

The offset at which pushing starts. Offset is relative to the pivot of either the moving visuals if there's any or the button itself.

(Inherited from PressableButton)

Methods

AnimateInHighlightPlate()

Animates in the highlight plate.

AnimateOutHighlightPlate()

Animates out the highlight plate and disables it when animated out.

GetDistanceAlongPushDirection(Vector3)

Returns the local distance along the push direction for the passed in world position

(Inherited from PressableButton)
GetLocalPositionAlongPushDirection(Single)

Returns local position along the push direction for the given local distance

(Inherited from PressableButton)
GetWorldPositionAlongPushDirection(Single)

Returns world space position along the push direction for the given local distance

(Inherited from PressableButton)
Start()
UpdateMovingVisualsPosition() UnityEngine.MonoBehaviour.UpdateMovingVisualsPosition

Explicit Interface Implementations

IMixedRealityTouchHandler.OnTouchCompleted(HandTrackingInputEventData) (Inherited from PressableButton)
IMixedRealityTouchHandler.OnTouchStarted(HandTrackingInputEventData) (Inherited from PressableButton)
IMixedRealityTouchHandler.OnTouchUpdated(HandTrackingInputEventData) (Inherited from PressableButton)

Applies to