# Controlling Haptics via code

**URL:** <https://qa.fmod.com/t/controlling-haptics-via-code/24247>\
**Category:** Unity\
**Tags:** unity\
**Created:** [May 8, 2026, 12:35pm UTC](https://qa.fmod.com/t/controlling-haptics-via-code/24247 "2026-05-08T12:35:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahdijeddi](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mahdijeddi/32/3988_2.png) [@mahdijeddi](https://qa.fmod.com/u/mahdijeddi)\
**Post date:** [May 8, 2026, 12:35pm UTC](https://qa.fmod.com/t/controlling-haptics-via-code/24247/1 "2026-05-08T12:35:17Z")

</div>

We’re trying to use FMOD haptics for our vibrations on PS5 and Switch2 platforms. One issue we have is how to implement a way to give player option to turn it off or lower the power. Also when game gets paused we set the buses to paused, but this doesn’t seem to stop the haptics effects that are already playing. Is there any way to pause or “mute” haptics via code?

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [May 12, 2026, 2:54am UTC](https://qa.fmod.com/t/controlling-haptics-via-code/24247/2 "2026-05-12T02:54:07Z")

</div>

Hi,

Thank you for sharing the information.

> [@mahdijeddi](#):
>
> One issue we have is how to implement a way to give player option to turn it off or lower the power. Also when game gets paused we set the buses to paused, but this doesn’t seem to stop the haptics effects that are already playing. Is there any way to pause or “mute” haptics via code?

For now the best workaround would be to control the haptics intensity through a global parameter.

For example, you could create a global continuous parameter such as `HapticIntensity` and use it to automate the Left/Right intensity of your Haptics Instruments.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/1/19e49878c2430b28b7b65b7b29cc02230b66e6b4.png)  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/9/900e13e350cabaeccdee5c69e0bac3b5e91b3b86.png)

Then in Unity, you can set the value via [Studio::System::setParameterByName](https://fmod.com/docs/2.03/api/studio-api-system.html#studio_system_setparameterbyname)

When the game is paused, set this parameter to 0, then restore it to the player’s selected value when the game is unpaused.

This should allow you to handle both the player vibration strength option and the pause menu case for any haptics clips using that global parameter.

Hope this helps! Let me know if you have more questions.

---

<div class="post-metadata">

**Author:** ![mahdijeddi](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mahdijeddi/32/3988_2.png) [@mahdijeddi](https://qa.fmod.com/u/mahdijeddi)\
**Post date:** [May 12, 2026, 11:08am UTC](https://qa.fmod.com/t/controlling-haptics-via-code/24247/4 "2026-05-12T11:08:40Z")

</div>

Are there any plans to support Switch2 and other platforms? Right now I can see that there are libfmod\_haptics in lib folder, but there is no way to load it either as dynamic or static lib in our builds, and the banks containing haptics instruments also fail loading when running on Switch2 DevKit.

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [May 13, 2026, 12:37am UTC](https://qa.fmod.com/t/controlling-haptics-via-code/24247/5 "2026-05-13T00:37:21Z")

</div>

> [@mahdijeddi](#):
>
> Are there any plans to support Switch2 and other platforms?

Switch 2 haptics is supported. The currently listed haptics supported devices/platforms can be found in [Haptics](https://www.fmod.com/docs/2.03/api/effects-reference.html#haptics)

> [@mahdijeddi](#):
>
> I can see that there are libfmod\_haptics in lib folder, but there is no way to load it either as dynamic or static lib in our builds, and the banks containing haptics instruments also fail loading when running on Switch2 DevKit.

Could I please get a screenshot of how your static plugin is set up in Unity?

You may have already tried this, but just to double check, could you please try adding the haptics plugin as a `Static Plugin` in the Switch 2 platform settings?

You can find more information about `Unity static plugins` here: [Static Plugin](https://www.fmod.com/docs/2.03/unity/plugins.html#static-plugins)

In `FMOD Settings > Platform Specific > Switch 2 > Static Plugins`, try adding:

`FMOD_Haptics_GetDSPDescription`

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/e/e8949a78cc664edf77fa7a841c1ea5bd63a68b8d.png)

If the bank still fails to load, could you please share the full bank loading error, along with the exact FMOD Studio and Unity integration version you are using?

---

<div class="post-metadata">

**Author:** ![mahdijeddi](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mahdijeddi/32/3988_2.png) [@mahdijeddi](https://qa.fmod.com/u/mahdijeddi)\
**Post date:** [May 14, 2026, 2:01pm UTC](https://qa.fmod.com/t/controlling-haptics-via-code/24247/6 "2026-05-14T14:01:00Z")

</div>

This solutions works. But we have another problem when turning on Stripping level on player settings we get the old error while loading the banks (we changed the exceptions to error messages so that game would still run):

[FMOD] PostLoad::initPluginEffects : DSP plugin returned an error, bank will not load properly.  
UnityEngine.DebugLogHandler:Internal\_Log(LogType, LogOption, String, Object)  
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object)  
UnityEngine.Logger:Log(LogType, Object)  
UnityEngine.Debug:LogError(Object)  
FMODUnity.RuntimeUtils:DebugLogError(String) (at D:\dev\goldman-switch\Assets\Plugins\FMOD\src\RuntimeUtils.cs:596)  
FMODUnity.RuntimeManager:DEBUG\_CALLBACK(DEBUG\_FLAGS, IntPtr, Int32, IntPtr, IntPtr) (at D:\dev\goldman-switch\Assets\Plugins\FMOD\src\RuntimeManager.cs:107)

Error loading bank: rom:/Data/StreamingAssets/Desktop/Haptic.bank  
UnityEngine.DebugLogHandler:Internal\_Log(LogType, LogOption, String, Object)  
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object)  
UnityEngine.Logger:Log(LogType, Object)  
UnityEngine.Debug:LogError(Object)  
FMODUnity.RuntimeManager:RegisterLoadedBank(LoadedBank, String, String, Boolean, RESULT) (at D:\dev\goldman-switch\Assets\Plugins\FMOD\src\RuntimeManager.cs:869)  
FMODUnity.RuntimeManager:LoadBank(String, Boolean, String) (at D:\dev\goldman-switch\Assets\Plugins\FMOD\src\RuntimeManager.cs:974)  
FMODUnity.RuntimeManager:LoadBank(String, Boolean) (at D:\dev\goldman-switch\Assets\Plugins\FMOD\src\RuntimeManager.cs:925)  
FMODSoundUtils:LoadAllBanks() (at D:\dev\goldman-switch\Assets\Scripts\Framework\Sound\FMODSoundUtils.cs:262)  
Startup:Awake() (at D:\dev\goldman-switch\Assets\Scripts\Levels\Common\Startup.cs:39)

---

<div class="post-metadata">

**Author:** ![mahdijeddi](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mahdijeddi/32/3988_2.png) [@mahdijeddi](https://qa.fmod.com/u/mahdijeddi)\
**Post date:** [May 15, 2026, 7:26pm UTC](https://qa.fmod.com/t/controlling-haptics-via-code/24247/7 "2026-05-15T19:26:08Z")

</div>

Adding FMOD to link.xml seems to fix this issue:

```auto
<assembly fullname="FMODUnity" preserve="all" />

```

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [May 18, 2026, 12:58am UTC](https://qa.fmod.com/t/controlling-haptics-via-code/24247/8 "2026-05-18T00:58:43Z")

</div>

Thank you for sharing the solution here!
