Class PressableButton
Inheritance
PressableButton
Implements
IMixedRealityTouchHandler
MonoBehaviour
Assembly: cs.temp.dll.dll
public class PressableButton : MonoBehaviour, IMixedRealityTouchHandler, MonoBehaviour
Fields
Declaration
public UnityEvent ButtonPressed
Field Value
Type |
Description |
UnityEvent |
|
Declaration
public UnityEvent ButtonPressed
Field Value
Type |
Description |
UnityEvent |
|
Declaration
public UnityEvent ButtonReleased
Field Value
Type |
Description |
UnityEvent |
|
Declaration
public UnityEvent ButtonReleased
Field Value
Type |
Description |
UnityEvent |
|
The object that is being pushed.
Declaration
protected GameObject movingButtonVisuals
Field Value
Type |
Description |
GameObject |
|
The object that is being pushed.
Declaration
protected GameObject movingButtonVisuals
Field Value
Type |
Description |
GameObject |
|
Declaration
protected float startPushDistance
Field Value
Declaration
protected float startPushDistance
Field Value
Declaration
public UnityEvent TouchBegin
Field Value
Type |
Description |
UnityEvent |
|
Declaration
public UnityEvent TouchBegin
Field Value
Type |
Description |
UnityEvent |
|
Declaration
public UnityEvent TouchEnd
Field Value
Type |
Description |
UnityEvent |
|
Declaration
public UnityEvent TouchEnd
Field Value
Type |
Description |
UnityEvent |
|
Properties
Current push distance relative to the start push plane.
Declaration
public float CurrentPushDistance { get; protected set; }
Property Value
Current push distance relative to the start push plane.
Declaration
public float CurrentPushDistance { get; protected set; }
Property Value
Describes in which coordinate space the plane distances are stored and calculated
Declaration
public PressableButton.SpaceMode DistanceSpaceMode { get; set; }
Property Value
Describes in which coordinate space the plane distances are stored and calculated
Declaration
public PressableButton.SpaceMode DistanceSpaceMode { get; set; }
Property Value
Ensures that the button can only be pushed from the front. Touching the button from the back or side is prevented.
Declaration
public bool EnforceFrontPush { get; }
Property Value
Ensures that the button can only be pushed from the front. Touching the button from the back or side is prevented.
Declaration
public bool EnforceFrontPush { get; }
Property Value
Represents the state of whether the button is currently being pressed.
Declaration
public bool IsPressing { get; }
Property Value
Represents the state of whether the button is currently being pressed.
Declaration
public bool IsPressing { get; }
Property Value
Represents the state of whether or not a finger is currently touching this button.
Declaration
public bool IsTouching { get; }
Property Value
Represents the state of whether or not a finger is currently touching this button.
Declaration
public bool IsTouching { get; }
Property Value
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
Declaration
public float LocalToWorldScale { get; }
Property Value
Maximum push distance. Distance is relative to the pivot of either the moving visuals if there's any or the button itself.
Declaration
public float MaxPushDistance { get; set; }
Property Value
Maximum push distance. Distance is relative to the pivot of either the moving visuals if there's any or the button itself.
Declaration
public float MaxPushDistance { get; set; }
Property Value
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.
Declaration
public float PressDistance { get; set; }
Property Value
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.
Declaration
public float PressDistance { get; set; }
Property Value
Withdraw amount needed to transition from Pressed to Released.
Declaration
public float ReleaseDistanceDelta { get; set; }
Property Value
Withdraw amount needed to transition from Pressed to Released.
Declaration
public float ReleaseDistanceDelta { get; set; }
Property Value
Button will send the release event on touch end after successful press even if release plane hasn't been passed.
Declaration
public bool ReleaseOnTouchEnd { get; set; }
Property Value
Button will send the release event on touch end after successful press even if release plane hasn't been passed.
Declaration
public bool ReleaseOnTouchEnd { get; set; }
Property Value
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.
Declaration
public float StartPushDistance { get; set; }
Property Value
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.
Declaration
public float StartPushDistance { get; set; }
Property Value
Methods
Returns the local distance along the push direction for the passed in world position
Declaration
public float GetDistanceAlongPushDirection(Vector3 positionWorldSpace)
Parameters
Type |
Name |
Description |
Vector3 |
positionWorldSpace |
|
Returns
Returns the local distance along the push direction for the passed in world position
Declaration
public float GetDistanceAlongPushDirection(Vector3 positionWorldSpace)
Parameters
Type |
Name |
Description |
Vector3 |
positionWorldSpace |
|
Returns
Returns world space position along the push direction for the given local distance
Declaration
public Vector3 GetWorldPositionAlongPushDirection(float localDistance)
Parameters
Type |
Name |
Description |
Single |
localDistance |
|
Returns
Returns world space position along the push direction for the given local distance
Declaration
public Vector3 GetWorldPositionAlongPushDirection(float localDistance)
Parameters
Type |
Name |
Description |
Single |
localDistance |
|
Returns
Declaration
protected virtual void Start()
Declaration
protected virtual void Start()
Declaration
protected virtual void UpdateMovingVisualsPosition()
Declaration
protected virtual void UpdateMovingVisualsPosition()
Implements
IMixedRealityTouchHandler
MonoBehaviour