# SendHapticBuffer(uint, byte[])

> Sends a raw buffer of haptic data to the device.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.XR](/engine/6000.0/script-reference/unityengine/xr.md)
* **Assembly:** UnityEngine.XRModule

```csharp
public bool SendHapticBuffer(uint channel, byte[] buffer)
```

### Parameters

**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): The channel to receive the data.**** (\[byte\[]]\(https\://learn.microsoft.com/dotnet/api/system.byte)): A raw byte buffer that contains the haptic data to send to the device.

### Returns

| Type                                                          | Description                                          |
| ------------------------------------------------------------- | ---------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if successful. Returns false otherwise. |

### Remarks

The buffered data plays at the sampleRate rate, represented by the frequencyHz value returned by a call to the TryGetCapabilities method, until it completes.

**Note:** Not all devices support playing haptic buffers. To determine whether buffered haptics are supported, call the [InputDevice.TryGetHapticCapabilities](/engine/6000.0/script-reference/unityengine/xr/inputdevice/trygethapticcapabilities.md) method and inspect the [HapticCapabilities.supportsBuffer](/engine/6000.0/script-reference/unityengine/xr/hapticcapabilities/supportsbuffer.md) property. Also, the size of the buffer sent to the [InputDevice](/engine/6000.0/script-reference/unityengine/xr/inputdevice.md) must never be greater than [HapticCapabilities.bufferMaxSize](/engine/6000.0/script-reference/unityengine/xr/hapticcapabilities/buffermaxsize.md).
