# Changing Paremeters in Unity From Code

**URL:** https://qa.fmod.com/t/changing-paremeters-in-unity-from-code/21495
**Category:** Unity
**Tags:** csharp, unity
**Created:** [April 13, 2024, 7:15am UTC](https://qa.fmod.com/t/changing-paremeters-in-unity-from-code/21495 "2024-04-13T07:15:45Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [April 17, 2024, 4:06am UTC](https://qa.fmod.com/t/changing-paremeters-in-unity-from-code/21495/2 "2024-04-17T04:06:13Z")

</div>

> [@Sportsy](#):
>
> ```auto
> paramTrigger.TriggerParameters();
> emitter.Play();
> 
> ```

The issue is with the ordering of these two lines of code. The Studio Event Emitter’s underlying event instance isn’t created until `emitter.Play()` is called, so in this case, the parameters that are being triggered aren’t applied because the event instance doesn’t exist yet. If you swap the order of the two, you should get the desired behavior.

---

_[View the full topic](https://qa.fmod.com/t/changing-paremeters-in-unity-from-code/21495)._
