# Get parameter ID from EventEmitter

**URL:** https://qa.fmod.com/t/get-parameter-id-from-eventemitter/18949
**Category:** Unity
**Created:** [June 29, 2022, 11:20am UTC](https://qa.fmod.com/t/get-parameter-id-from-eventemitter/18949 "2022-06-29T11:20:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Eneco](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/eneco/32/6046_2.png) [@Eneco](https://qa.fmod.com/u/Eneco)
#### Post date: [June 29, 2022, 11:20am UTC](https://qa.fmod.com/t/get-parameter-id-from-eventemitter/18949/1 "2022-06-29T11:20:14Z")

</div>

I’m trying to get the parameter ID from a StudioEventEmitter, but there seem to have been some changes to the API, as I’m getting the following error:

> “StudioEventEmitter.Event” is obsolete: Use the EventReference field instead"

This is my code:

```auto
public FMODUnity.StudioEventEmitter Emitter;
FMOD.Studio.EventDescription OcclusionDescription;
FMOD.Studio.PARAMETER_DESCRIPTION VolumeDescription;

void Awake()
    {
        OcclusionDescription = FMODUnity.RuntimeManager.GetEventDescription(Emitter.Event);
        OcclusionDescription.getParameterDescriptionByName("Volume", out VolumeDescription);
        VolumeId = VolumeDescription.id;
    }

```

How do I change it, to make it work with the new API?

---

<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: [July 1, 2022, 3:49am UTC](https://qa.fmod.com/t/get-parameter-id-from-eventemitter/18949/2 "2022-07-01T03:49:03Z")

</div>

Hi,

All you need to change is the line

```auto
OcclusionDescription = FMODUnity.RuntimeManager.GetEventDescription(Emitter.Event);

```

To

```auto
OcclusionDescription = FMODUnity.RuntimeManager.GetEventDescription(Emitter.EventReference); 

```

Hope this helps!

---

<div class="post-metadata">

### Author: ![Eneco](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/eneco/32/6046_2.png) [@Eneco](https://qa.fmod.com/u/Eneco)
#### Post date: [July 1, 2022, 11:25am UTC](https://qa.fmod.com/t/get-parameter-id-from-eventemitter/18949/3 "2022-07-01T11:25:37Z")

</div>

Thank you very much, works like a charm.
