UxrHapticClip Class

Describes a haptic clip. It is possible to specify an audio clip whose wave will be used as a primary source for the vibration, but also a secondary clip type that will be used if the device doesn’t support audio clips as haptic feedback. If no audio clip is specified, the fallback clip type will always be used.

Inheritance Hierarchy

System.Object
  UltimateXR.Haptics.UxrHapticClip
Namespace: UltimateXR.Haptics
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

[SerializableAttribute]
public class UxrHapticClip


The UxrHapticClip type exposes the following members.

Constructors

NameDescription
Public methodUxrHapticClip Public constructor.

Properties

NameDescription
Public propertyClip Gets or sets the primary AudioClip to use as source for vibration. If the device does not support audio clips as sources or this value is null, FallbackClipType will be used.
Public propertyClipAmplitude Gets or sets the amplitude to play Clip. Valid range is [0.0, 1.0].
Public propertyFallbackAmplitude Gets or sets the amplitude to play the fallback clip (1.0f = use default).
Public propertyFallbackClipType Gets or sets the fallback clip: A value from a pre-defined set of procedurally generated haptic feedback clips. It will be used if the current device can’t play AudioClip as haptics or Clip is not assigned.
Public propertyFallbackDurationSeconds Gets or sets the duration in seconds of the fallback clip (negative = use predefined).
Public propertyHapticMode Gets or sets whether to replace or mix the clip with any current haptic feedback being played.

Extension Methods

NameDescription
Public Extension MethodThrowIfNull Throws an exception if the object is null. (Defined by ObjectExt.)

See Also

Reference

UltimateXR.Haptics Namespace