# \[Unity w/Playmaker\] Can't Trigger Local Parameter Change in FSM

**URL:** <https://qa.fmod.com/t/unity-w-playmaker-cant-trigger-local-parameter-change-in-fsm/23854>\
**Category:** Unity\
**Tags:** unity, csharp\
**Created:** [January 1, 2026, 6:07am UTC](https://qa.fmod.com/t/unity-w-playmaker-cant-trigger-local-parameter-change-in-fsm/23854 "2026-01-01T06:07:57Z")\
**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:** [January 1, 2026, 6:07am UTC](https://qa.fmod.com/t/unity-w-playmaker-cant-trigger-local-parameter-change-in-fsm/23854/1 "2026-01-01T06:07:57Z")

</div>

I’m trying to trigger the local labelled parameter _Ball Weight_ to change which _Ball Destroy_ sfx to play per instance of ball.

 ![Screenshot 2026-01-01 at 2.04.07 pm](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/3/375d62a922c18c7ee94f1783a64d544b51d8567d.png)

Here’s the prefabs:

 ![Screenshot 2026-01-01 at 1.51.17 pm](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/c/cdedc779b04fe42aa71971011c553d0be081004d.png)

 ![Screenshot 2026-01-01 at 1.51.27 pm](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/2/29d9a8c221cb937ef5c9da2dbffb54aa81504fc0.png)

In the following FSM, the _Weight_ variable is retrieved in _Get Parent Ball_ and set as the variable _BallWeight_ within the FSM.

 ![Screenshot 2026-01-01 at 1.50.42 pm](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/a/afd36aa74506848f9a5fce300e6e0bd643f67786.png)

With _String Compare,_ I check value of _BallWeight_ and send it to the corresponding state, which then sets the parameter integer value as _ParameterValue_.

 ![Screenshot 2026-01-01 at 1.50.44 pm](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/f/f6929488535657319fe72a2b9fdc0299f4347598.png)

Finally, I use the _ParamaterValue_ to set the local _Ball Weight_ parameter with a custom script, then call Play() on the attached emitter.

 ![Screenshot 2026-01-01 at 1.50.54 pm](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/c/c29deda515144bd0cb233299a0320a16f398ae7d.png)

Here’s the script:

```csharp
using UnityEngine;
using HutongGames.PlayMaker;
using FMODUnity;
using FMOD.Studio;

namespace HutongGames.PlayMaker.Actions
{
    [ActionCategory("FMOD")]
    [Tooltip("Sets a local FMOD parameter on a Studio Event Emitter using an FsmVar.")]
    public class SetLocalFMODParameter : FsmStateAction
    {
        [RequiredField]
        [Tooltip("GameObject containing the FMOD Studio Event Emitter.")]
        public FsmOwnerDefault gameObject;

        [RequiredField]
        [Tooltip("Name of the FMOD parameter.")]
        public FsmString parameterName;

        [RequiredField]
        [Tooltip("Value to set (Float, Int, or String for labeled parameters).")]
        public FsmVar parameterValue;

        [Tooltip("Repeat every frame.")]
        public bool everyFrame;

        private StudioEventEmitter emitter;
        private EventInstance eventInstance;

        public override void Reset()
        {
            gameObject = null;
            parameterName = "";
            parameterValue = new FsmVar();
            everyFrame = false;
        }

        public override void OnEnter()
        {
            DoSetParameter();

            if (!everyFrame)
                Finish();
        }

        public override void OnUpdate()
        {
            DoSetParameter();
        }

        void DoSetParameter()
        {
            GameObject go = Fsm.GetOwnerDefaultTarget(gameObject);
            if (go == null)
                return;

            if (emitter == null)
                emitter = go.GetComponent<StudioEventEmitter>();
            if (emitter == null)
                return;

            eventInstance = emitter.EventInstance;

            switch (parameterValue.Type)
            {
                case VariableType.Float:
                    eventInstance.setParameterByName(
                        parameterName.Value,
                        parameterValue.floatValue
                    );
                    break;

                case VariableType.Int:
                    eventInstance.setParameterByName(
                        parameterName.Value,
                        parameterValue.intValue
                    );
                    break;

                case VariableType.String:
                    eventInstance.setParameterByNameWithLabel(
                        parameterName.Value,
                        parameterValue.stringValue
                    );
                    break;
            }
        }
    }
}

```

I’m aware local parameters can’t be updated before the instance is created, and I‘ve tried triggering Play() and _then_ setting the parameter (with and without a frame delay) but with no luck.

Oh, and for the purposes of testing I’m hard coding the values. Once it’s working, I’ll dynamically set the parameter by the label name. This was my initial setup which didn’t work, so I changed it to use the integer values instead in hopes this would solve the issue.

---

<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:** [January 1, 2026, 6:34am UTC](https://qa.fmod.com/t/unity-w-playmaker-cant-trigger-local-parameter-change-in-fsm/23854/2 "2026-01-01T06:34:59Z")

</div>

Interestingly, this setup _occasionally_ works. It seems to work when balls destroy in rapid succession, so I suspect it’s because the instances were already playing when the parameter updates.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/7/7a3e97abf9318501342248962412ed7cf812550f.jpeg)

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [January 5, 2026, 2:50am UTC](https://qa.fmod.com/t/unity-w-playmaker-cant-trigger-local-parameter-change-in-fsm/23854/3 "2026-01-05T02:50:01Z")

</div>

Hi,

Thanks for the images and information.

Unfortunately, we do not have access to Play Maker plugin.

Could I please grab your Unity and FMOD integration versions?

With the following settings enabled:

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

Are there any FMOD errors in the console?

Most FMOD functions return [FMOD Engine | Core Api Common - Fmod::Result](https://fmod.com/docs/2.03/api/core-api-common.html#fmod_result), are you able to log those through Play Maker? In your `DoSetParameter()` can we add `FMOD.RESULT result = eventInstance.SetParameterByName()`and log the results of those calls too?

---

<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:** [January 6, 2026, 9:25am UTC](https://qa.fmod.com/t/unity-w-playmaker-cant-trigger-local-parameter-change-in-fsm/23854/4 "2026-01-06T09:25:08Z")

</div>

No worries. The same logic should still apply.

Here’s some errors from FMOD. The Button Status and Null Reference errors aren’t relevant.

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

I’m not sure exactly what you mean by eventInstance. It’s not a variable I have in my script, and I don’t know exactly how to set that up. I added a log to see if the correct label was sent:

```csharp
void DoSetParameter()

        {

GameObject go = Fsm.GetOwnerDefaultTarget(gameObject);

if (go == null)

return;

if (emitter == null)

emitter = go.GetComponent<StudioEventEmitter>();

if (emitter == null)

return;

switch (parameterValue.Type)

            {

case VariableType.Float:

emitter.SetParameter(

parameterName.Value,

parameterValue.floatValue

                    );

break;

case VariableType.Int:

emitter.SetParameter(

parameterName.Value,

parameterValue.intValue

                    );

break;

case VariableType.String:

if (string.IsNullOrEmpty(parameterValue.stringValue))

return;

if (!emitter.IsPlaying())

emitter.Play();

var instance = emitter.EventInstance;

if (!instance.isValid())

return;

UnityEngine.Debug.Log($"FMOD Label → Param: '{parameterName.Value}', Label: '{parameterValue.stringValue}'");

instance.setParameterByNameWithLabel(

parameterName.Value,

parameterValue.stringValue

                    );

break;

            }

```

Each ball’s weight is initially an empty string when the ball is enabled (they’re initially pooled and then disabled), so I added a condition for this. Now, they correctly send the corresponding weight though only _sometimes_ plays the correct sound. Even more interestingly, when the correct sound _does_ play it _also_ plays the default sound (Medium).

UPDATE:  
I changed the starting ball weight from _Medium_ to _Extra Light_ to see if I could find out why it only works sometimes. Strangely, it plays the _Medium s_fx by default and switches to the _Extra Light_ sfx immediately after clicking on the Ball instance and opening the BallCollisionSFX FSM. Tested this multiple times, worked every time, and _only_ when opening BallCollisionSFX. I’m stumped.

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [January 7, 2026, 4:09am UTC](https://qa.fmod.com/t/unity-w-playmaker-cant-trigger-local-parameter-change-in-fsm/23854/5 "2026-01-07T04:09:37Z")

</div>

Thank you for the logs.

The [FMOD\_ERR\_EVENT\_NOTFOUND](https://fmod.com/docs/2.03/api/core-api-common.html#fmod_result:~:text=connection%20timed%20out.-,FMOD_ERR_EVENT_NOTFOUND,-The%20requested%20event) could be telling us there is an issue with the event instance we are interacting with.

> [@MightyMuso](#):
>
> I’m not sure exactly what you mean by eventInstance

The [FMOD Studio | Glossary - Event Instance](https://fmod.com/docs/2.03/studio/glossary.html#event-instance) is an instance of our FMOD Studio event that is mostly likely being created by our [Unity Integration | Game Components - Studio Event Emitter](https://fmod.com/docs/2.03/unity/game-components.html#studio-event-emitter).

Here we are getting a reference to the instance attached to our emitter

```csharp
emitter = go.GetComponent<StudioEventEmitter>();
eventInstance = emitter.EventInstance;

```

Then setting the parameter attached to our event instance:

```csharp
eventInstance.setParameterByName(
    parameterName.Value,
    parameterValue.floatValue
);

```

Some additional checks we could add are:

```csharp
if (eventInstance.isValid())

```

Could I please get a screenshot of your event emitter in Unity:

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

I am thinking there may be an issue with our emitter.

---

<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:** [January 9, 2026, 6:02am UTC](https://qa.fmod.com/t/unity-w-playmaker-cant-trigger-local-parameter-change-in-fsm/23854/6 "2026-01-09T06:02:01Z")

</div>

I see, thanks for clarifying. Here’s the emitter:

 ![Screenshot 2026-01-09 at 1.31.12 pm](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/7/7a7dc0af5aeedfda8d5513185111f4fabab2e2dc.png)

Since the FSM handles the emitter triggering, it’s best to keep them as None here. They both trigger fine, the parameter just doesn’t update.

I updated my code as suggested, though Unity can’t find SetParameterByName on eventInstance. I’m using version 2.02.30.

```csharp
void DoSetParameter()

        {

GameObject go = Fsm.GetOwnerDefaultTarget(gameObject);

emitter = go.GetComponent<StudioEventEmitter>();

EventInstance eventInstance = emitter.EventInstance;

if (go == null || emitter == null || !eventInstance.isValid())

return;

switch (parameterValue.Type)

            {

case VariableType.Float:

eventInstance.SetParameterByName(

parameterName.Value,

parameterValue.floatValue

                    );

break;

case VariableType.Int:

eventInstance.SetParameterByName(

parameterName.Value,

parameterValue.intValue

                    );

break;

case VariableType.String:

eventInstance.setParameterByNameWithLabel(

parameterName.Value,

parameterValue.stringValue

                    );

break;

            }

        }

```

 ![Screenshot 2026-01-09 at 2.00.22 pm](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/5/5d2e2a88778658d1818b77d13ee0af4795cad400.png)

Current version:

 ![Screenshot 2026-01-09 at 2.00.59 pm](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/2/278a6d28c4b31d7422cda7dc9eca6ba3ebbc0f04.png)

UPDATE 1:

I updated FMOD and FMOD Studio as I didn’t realise there was a new version available. After importing the updated files, I get this error:

![Screenshot 2026-01-09 at 2.44.15 pm](https://canada1.discourse-cdn.com/flex036/uploads/fmod/optimized/2X/4/47170547386bb908fa5980067b47eba6199291ef_2_690x19.png)

I’ve also migrated the FMOD Studio project and rebuilt the banks. The Unity editor version is 6000.0.62f1. The line of code where the error originates from is `public FMOD.DSP_FFT_WINDOW windowType = FMOD.DSP_FFT_WINDOW.HANNING`

UPDATE 2:

Seems like the syntax has changed to `DSP_FTT_WINDOW_TYPE`, though now Unity can’t find `FMOD.DSP_FTT.WINDOWTYPE`in `_fft.setParameterInt((int)FMOD.DSP_FFT.WINDOWTYPE, (int)windowType);`.

UPDATE 3:

Fixed the above issue, just incorrect syntax. Same with the FMOD Unity error; was incorrectly using SetParamaterByName instead of setParameterByName. I’ve updated the script to check if the eventInstance is valid, which it’s not.

![Screenshot 2026-01-09 at 4.28.16 pm](https://canada1.discourse-cdn.com/flex036/uploads/fmod/optimized/2X/4/4b72683ef1432fe01b9690fd54444b87083a0079_2_690x67.png)

FMOD.RESULT logs this:

![Screenshot 2026-01-09 at 4.30.20 pm](https://canada1.discourse-cdn.com/flex036/uploads/fmod/optimized/2X/a/ae83ad50ebab55d9b79c8776683522bc590fb47c_2_690x67.png)

UPDATE 4:

I can confirm opening the FSM window somehow allows the parameter to trigger correctly. FMOD.RESULT is logged where the labelled parameter is set, returning ERR\_EVENT\_NOTFOUND until the FSM window is opened, where it returns OK.

 ![Screenshot 2026-01-09 at 4.44.43 pm](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/8/89c6d4c86dec092e63d9476106b95f4ded9a94af.png)

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [January 11, 2026, 11:04pm UTC](https://qa.fmod.com/t/unity-w-playmaker-cant-trigger-local-parameter-change-in-fsm/23854/7 "2026-01-11T23:04:48Z")

</div>

Thank you for the info! Good to hear you were able to work through those issues.

Just to make sure I understand, with the FSM window open it updates the parameter as expected? With the window closed you receive the error `ERR_EVENT_NOTFOUND`?

Would it be possible to share a stripped down version of the project with the issue or possible to make a test project that has the issue that I could test on my side? It can be uploaded to your [profile](https://fmod.com/profile#uploads).

Thank you!
