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 Unity’s Streaming Assets, and those haptic effects 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 streaming assets of the project which is located in your project atAssets/StreamingAssets/Haptics. You can either directly drag haptic clips to this folder in Finder/Explorer, or you can drag them into the Unity Project Explorer.

The haptic clips you add to this location will be selectable via the Haptic Source component, explained next.

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, select a haptic clip from the ones you have earlier placed in Assets/StreamingAssets/Haptics:

    Select Haptic Clip

< Prev Next >

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