# FMOD Parameter Trigger not updating parameter in Unity

**URL:** https://qa.fmod.com/t/fmod-parameter-trigger-not-updating-parameter-in-unity/23415
**Category:** Unity
**Tags:** unity
**Created:** [October 1, 2025, 3:50am UTC](https://qa.fmod.com/t/fmod-parameter-trigger-not-updating-parameter-in-unity/23415 "2025-10-01T03:50:45Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![MightyMuso](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mightymuso/32/9096_2.png) [@MightyMuso](https://qa.fmod.com/u/MightyMuso)
#### Post date: [October 1, 2025, 3:50am UTC](https://qa.fmod.com/t/fmod-parameter-trigger-not-updating-parameter-in-unity/23415/1 "2025-10-01T03:50:45Z")

</div>

I’m working on a client’s game and I’m having trouble triggering a parameter change.

The game has a prefab called _DarkMatter_ which triggers my local _Perk_ parameter to update when the prefab is created. The emitter using this parameter is on the _PegBasic_ prefab which triggers on _Collision Enter 2D._

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

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

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

The parameter doesn’t seem to update, though manually changing the parameter on a _PegBasic_ object does work and the sound plays as expected.

The sounds are managed in a dedicated _Perk Manager_ event with a parameter sheet.

 ![Screenshot 2025-10-01 at 12.07.29 pm](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/7/7d98ae54e64dbdd9f9fc522765f396e18d444601.png)

---

<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: [October 2, 2025, 6:01am UTC](https://qa.fmod.com/t/fmod-parameter-trigger-not-updating-parameter-in-unity/23415/2 "2025-10-02T06:01:13Z")

</div>

Hi,

Thanks for the detailed screenshots!

From what I can see, the issue might caused by timing: your `Studio Parameter Triggers` fire on **Object Start/Disable** , but the `Studio Event Emitter` on `PegBasic` only creates the event instance on **Collision Enter 2D**. When the triggers run, there’s no instance yet, so the local `Perk` parameter isn’t applied. Later, when the collision occurs and the instance is finally created, it uses the event’s default parameter value, which makes it seem like the parameter change didn’t work.

For reference, a similar discussion can be found here: [Changing Paremeters in Unity From Code - #2 by Leah\_FMOD](https://qa.fmod.com/t/changing-paremeters-in-unity-from-code/21495/2)

---

<div class="post-metadata">

### Author: ![MightyMuso](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mightymuso/32/9096_2.png) [@MightyMuso](https://qa.fmod.com/u/MightyMuso)
#### Post date: [November 4, 2025, 10:30am UTC](https://qa.fmod.com/t/fmod-parameter-trigger-not-updating-parameter-in-unity/23415/3 "2025-11-04T10:30:31Z")

</div>

Thanks for your input! That makes sense and I’ve changed the PegBasic prefab to trigger on ObjectStart, though no change. I’ve checked the specific instance of the peg to see if it updates, though the parameter is still None.

I also tried removing an initial parameter value from the PegBasic prefab, though this didn’t help. Is this something I’ll need to change in the code? I popped a couple of debugging messages in the Play() and TriggerParameters() functions and it revealed Play() isn’t actually running at all, not even when the trigger is Object Start.

---

<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: [November 10, 2025, 10:38pm UTC](https://qa.fmod.com/t/fmod-parameter-trigger-not-updating-parameter-in-unity/23415/4 "2025-11-10T22:38:30Z")

</div>

Thank you for sharing the extra info.

> [@MightyMuso](#):
>
> I also tried removing an initial parameter value from the PegBasic prefab, though this didn’t help. Is this something I’ll need to change in the code?

Could you please share a small code snippet showing how/where you play the sound (e.g., the `Play()` call and any parameter writes)? That’ll help me see the timing/order.

Also, could you please set **Logging Level to Log** and **Enable API Error Logging** (FMOD → Edit Settings), then try to play the sound and attach the full log so I can take a closer look?

 ![enableLogImage](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/8/88a8e3ce70154b374eda69f1198482bbe65d39ab.png)

---

<div class="post-metadata">

### Author: ![MightyMuso](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mightymuso/32/9096_2.png) [@MightyMuso](https://qa.fmod.com/u/MightyMuso)
#### Post date: [November 13, 2025, 11:16am UTC](https://qa.fmod.com/t/fmod-parameter-trigger-not-updating-parameter-in-unity/23415/5 "2025-11-13T11:16:06Z")

</div>

Sure, here’s what I found:

`StudioEventEmitter.cs`

```csharp
public void Play()

        {

// UnityEngine.Debug.Log($"[FMOD] Play called on Event Emitter with Event '{EventReference.Path}'");

if (TriggerOnce && hasTriggered)

            {

return;

            }

if (EventReference.IsNull)

            {

return;

            }

cachedParams.Clear();

if (!eventDescription.isValid())

            {

Lookup();

            }

bool isSnapshot;

eventDescription.isSnapshot(out isSnapshot);

if (!isSnapshot)

            {

eventDescription.isOneshot(out isOneshot);

            }

bool is3D;

eventDescription.is3D(out is3D);

IsActive = true;

if (is3D && !isOneshot && Settings.Instance.StopEventsOutsideMaxDistance)

            {

RegisterActiveEmitter(this);

UpdatePlayingStatus(true);

            }

else

            {

PlayInstance();

            }

        }

```

I tried adding some debug logs in StudioParameterTrigger.cs to figure out where exactly the issue is. Even when setting the PegBasic event emitter trigger to Object Start, the target (PegBasic) is never valid and the the parameter never triggers.

```csharp
public void TriggerParameters()

        {

for (int i = 0; i < Emitters.Length; i++)

            {

var emitterRef = Emitters[i];

UnityEngine.Debug.Log($"[FMOD] Trigger Parameter Target: {emitterRef.Target}. Target Valid: {emitterRef.Target.EventInstance.isValid()}.");

// FIXME: Perks don't update local Perk parameter for PegBasic - isValid() is

if (emitterRef.Target != null && emitterRef.Target.EventInstance.isValid())

                {

for (int j = 0; j < Emitters[i].Params.Length; j++)

                    {

emitterRef.Target.EventInstance.setParameterByID(Emitters[i].Params[j].ID, Emitters[i].Params[j].Value);

                    }

                }

            }

        }

```

[Editor.log](https://qa.fmod.com/uploads/short-url/2UKzuuHY4Z1iedAVwKwqPH7ZIho.log) (3.6 MB)

Hopefully this is the correct log.

---

<div class="post-metadata">

### Author: ![MightyMuso](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mightymuso/32/9096_2.png) [@MightyMuso](https://qa.fmod.com/u/MightyMuso)
#### Post date: [November 18, 2025, 8:37am UTC](https://qa.fmod.com/t/fmod-parameter-trigger-not-updating-parameter-in-unity/23415/6 "2025-11-18T08:37:49Z")

</div>

Been chatting with the devs about this and I think we’ve found the issue.The lead dev isn’t a programmer and they’ve made this entirely with PlaymakerFSM, so they aren’t following common Unity programming conventions. In this case, PegBasic instances aren’t being instantiated in the traditional sense, they’re preloaded into a parent prefab. The Emitter’s Play() method never runs because the object is never ‘created’, so naturally TriggerParameter() can never find the PegBasic instance.

We’re working on a way to fix this that doesn’t require creating every instance of a peg (this would slow down the game significantly), unless there’s a way for Emitters to trigger for objects created at runtime.

---

<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: [November 19, 2025, 4:56am UTC](https://qa.fmod.com/t/fmod-parameter-trigger-not-updating-parameter-in-unity/23415/7 "2025-11-19T04:56:02Z")

</div>

Thank you for providing extra details and the log!

> [@MightyMuso](#):
>
> In this case, PegBasic instances aren’t being instantiated in the traditional sense, they’re preloaded into a parent prefab. The Emitter’s Play() method never runs because the object is never ‘created’, so naturally TriggerParameter() can never find the PegBasic instance.

It looks like the log confirms your findings: the parameter triggers fire before any `EventInstance` exists because `Play()` never runs. Since the pegs are preloaded and don’t hit the usual Unity lifecycle hooks (Start/OnEnable), the StudioEventEmitter won’t play automatically.

> [@MightyMuso](#):
>
> We’re working on a way to fix this that doesn’t require creating every instance of a peg (this would slow down the game significantly), unless there’s a way for Emitters to trigger for objects created at runtime.

Two approaches that might fit your workflow:

- **Trigger a lifecycle:** pool pegs as inactive, set emitter to OnEnable, then `SetActive(true)` when used. This ensures `Play()` happens before you set parameters.
- **Control it explicitly:** from Playmaker or a tiny bridge script, call `emitter.Play()` (or create/start an `EventInstance` directly) and then set the `Perk` parameter, which is commonly recommended for runtime driven behavior. You can find a related discussion here: [Changing a SudioEventEmitter's Event During Runtime - #2 by Leah\_FMOD](https://qa.fmod.com/t/changing-a-sudioeventemitters-event-during-runtime/19532/2)

Hope this helps!
