Notifications
SendNotification
Shows a notification. Every field is optional.
send('SendNotification', {
jsonData: {
title: 'Download complete',
content: '<b>build.zip</b> finished downloading.',
timeout: 5,
audioPath: 'default',
},
});
| Field | Type | Default | |
|---|---|---|---|
title | string | "" | Supports Unity rich text (opens in a new tab). |
content | string | "" | Supports rich text. Empty shows the small form. |
timeout | float | 0.5 | Seconds on screen. |
height | float | 175 | Height when there's content. |
opacity | float | 1 | 0 is treated as 1. |
volume | float | 0.7 | |
audioPath | string | "" | .ogg path, or "default", "error", "warning". Empty is silent. |
icon | string | "default" | Image path, base64 image, or "default", "error", "warning". |
useBase64Icon | bool | false | true when icon is base64. |
sourceApp | string | "" | Your app's name, shown in logs. |
type | int | 1 | Leave as 1. |
PlayAudio
send('PlayAudio', { jsonData: { audioPath: 'C:/Sounds/ding.ogg', volume: 0.8 } });jsonData
{
audioPath: string
volume: number // 0 – 1. Defaults to 0, so always set it.
spatial: boolean
spatialPosition: [x: number, y: number, z: number]
minDistance: number
maxDistance: number
}PlayDeviceHaptics
send('PlayDeviceHaptics', { jsonData: { deviceId: 'leftcontroller', duration: 2000 } });jsonData
{
deviceId: string // "leftcontroller", "rightcontroller", or a SteamVR device index such as "3"
duration: number // Microseconds, scaled by the Haptics Strength setting
}