Link Search Menu Expand Document

Assigning Haptic Clips to Game Objects

🔥NOTE: The Studio plug-in for Unity is currently in beta and under development. Information on this page is subject to change.

Haptic clips are created with either the Studio desktop app or the Studio web app. A haptic clip contains high-definition, device-agnostic haptic data that the Studio plug-in for Unity uses to create an optimal haptic effect on playback devices.

The Studio plug-in for Unity implements haptics in a similar fashion to Unity’s own audio system whereby Haptic Source components are placed onto game objects and assigned various haptic clips taken from the games assets, and those haptic effects generated by the Haptic Source components are then received by the Haptic Receiver component typically attached to the Main Camera.

Adding Haptic Clips to the Project

Any haptic clip that you wish to use in your Unity application must first be added to the project. Specifically, the haptic clips (files ending with the extension .haptic) must be added to the Assets folder (or a sub-folder of your choosing) in the project. You can either directly drag haptic clips to this folder in Finder/Explorer, or you can drag them into the Unity Project Explorer.

Haptic Assets in Unity Project

Assigning a Haptic Source to a Game Object

  1. Click on a GameObject in the scene hierarchy to which you want to assign a haptic clip:

    Select Game Object

  2. In the Inspector, click “Add Component”:

    Click Add Component

  3. Type “haptic” in the search box and select Haptic Source from the list:

    Select "Haptic Source"

  4. In the inspector for this component, assign a haptic clip either by dragging one from the Project Window, or by clicking the small circle icon to the right of the Inspector property and selecting a clip from the list:

Select Haptic Clip

Assigning playback priority to a Haptic Source

  1. Check the inspector for the Haptic Source you want to change the playback priority. Select Haptic Clip

  2. Drag the slider to set a priority value from 0 (Highest priority) to 256 (Lowest priority). By default, a Haptic Source priority is set to 128, just like an Audio Source.

< Prev Next >


Copyright © 2020-2021 Lofelt GmbH. All rights reserved.