編輯

共用方式為


InteractionSourceExtensions.StartHaptics Method

Definition

Overloads

StartHaptics(InteractionSource, Single)

Start haptic feedback on the interaction source with the specified intensity.

StartHaptics(InteractionSource, Single, Single)

Start haptic feedback on the interaction source with the specified intensity and continue for the specified amount of time.

StartHaptics(InteractionSource, Single)

Start haptic feedback on the interaction source with the specified intensity.

public:
[System::Runtime::CompilerServices::Extension]
 static void StartHaptics(UnityEngine::XR::WSA::Input::InteractionSource interactionSource, float intensity);
public:
[System::Runtime::CompilerServices::Extension]
 static bool StartHaptics(UnityEngine::XR::WSA::Input::InteractionSource interactionSource, float intensity);
public static void StartHaptics (this UnityEngine.XR.WSA.Input.InteractionSource interactionSource, float intensity);
public static bool StartHaptics (this UnityEngine.XR.WSA.Input.InteractionSource interactionSource, float intensity);
static member StartHaptics : UnityEngine.XR.WSA.Input.InteractionSource * single -> unit
static member StartHaptics : UnityEngine.XR.WSA.Input.InteractionSource * single -> bool
<Extension()>
Public Sub StartHaptics (interactionSource As InteractionSource, intensity As Single)
<Extension()>
Public Function StartHaptics (interactionSource As InteractionSource, intensity As Single) As Boolean

Parameters

interactionSource
UnityEngine.XR.WSA.Input.InteractionSource

The source to start haptics on.

intensity
Single

The strength of the haptic feedback from 0.0 (no haptics) to 1.0 (maximum strength).

Returns

Applies to

StartHaptics(InteractionSource, Single, Single)

Start haptic feedback on the interaction source with the specified intensity and continue for the specified amount of time.

public:
[System::Runtime::CompilerServices::Extension]
 static void StartHaptics(UnityEngine::XR::WSA::Input::InteractionSource interactionSource, float intensity, float durationInSeconds);
public:
[System::Runtime::CompilerServices::Extension]
 static bool StartHaptics(UnityEngine::XR::WSA::Input::InteractionSource interactionSource, float intensity, float durationInSeconds);
public static void StartHaptics (this UnityEngine.XR.WSA.Input.InteractionSource interactionSource, float intensity, float durationInSeconds);
public static bool StartHaptics (this UnityEngine.XR.WSA.Input.InteractionSource interactionSource, float intensity, float durationInSeconds);
static member StartHaptics : UnityEngine.XR.WSA.Input.InteractionSource * single * single -> unit
static member StartHaptics : UnityEngine.XR.WSA.Input.InteractionSource * single * single -> bool
<Extension()>
Public Sub StartHaptics (interactionSource As InteractionSource, intensity As Single, durationInSeconds As Single)
<Extension()>
Public Function StartHaptics (interactionSource As InteractionSource, intensity As Single, durationInSeconds As Single) As Boolean

Parameters

interactionSource
UnityEngine.XR.WSA.Input.InteractionSource

The source to start haptics on.

intensity
Single

The strength of the haptic feedback from 0.0 (no haptics) to 1.0 (maximum strength).

durationInSeconds
Single

The time period expressed in seconds.

Returns

Applies to