# How to replace the deprecated ParameterInstance class in 2.0?

**URL:** https://qa.fmod.com/t/how-to-replace-the-deprecated-parameterinstance-class-in-2-0/14459
**Category:** Unity
**Created:** [March 19, 2019, 1:43pm UTC](https://qa.fmod.com/t/how-to-replace-the-deprecated-parameterinstance-class-in-2-0/14459 "2019-03-19T13:43:29Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![alexzzen](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alexzzen/32/6825_2.png) [@alexzzen](https://qa.fmod.com/u/alexzzen)
#### Post date: [March 19, 2019, 1:43pm UTC](https://qa.fmod.com/t/how-to-replace-the-deprecated-parameterinstance-class-in-2-0/14459/1 "2019-03-19T13:43:29Z")

</div>

Hi,

I’m excited about the new features in 2.0. Thank you for this amazing release! I just was testing the integration and in older versions I was using this method to set a parameter:

> ```
> public void SetParameterFloat(FMOD.Studio.EventInstance instance, string parameter, float value)
> {
> FMOD.Studio.ParameterInstance _parameter;
> instance.getParameter(parameter, out _parameter);
> 
> _parameter.setValue(value);
> }
> 
> ```

My knowledge of C# is basic and I thought this was a very simple way of setting a parameter. I can’t understand very well how to use the new event functions to archieve a similar result in code. Can I just use _setParameterByName(parameter, value)_ to quickly set a parameter now? What are the EventDescription and ParameterDescription useful for? I think that’s something I haven’t managed to understand and that could clear up my mind : )

Alex

---

<div class="post-metadata">

### Author: ![Shadoninja](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@Shadoninja](https://qa.fmod.com/u/Shadoninja)
#### Post date: [March 20, 2019, 3:20am UTC](https://qa.fmod.com/t/how-to-replace-the-deprecated-parameterinstance-class-in-2-0/14459/2 "2019-03-20T03:20:14Z")

</div>

I hit this too, but my entire project exploded, so I bailed on upgrading right now. setParameterByName should work perfectly fine. If it doesn’t, I suggest you report it as a bug 😉

---

<div class="post-metadata">

### Author: ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)
#### Post date: [March 24, 2019, 10:25pm UTC](https://qa.fmod.com/t/how-to-replace-the-deprecated-parameterinstance-class-in-2-0/14459/3 "2019-03-24T22:25:02Z")

</div>

@Shadoninja is correct, _setParameterByName_ can be used in place of that function.

The description objects can be thought of as the default object from Studio, you can get all the information about the object but most things can only be set on an instance of that object.

> In studio api, typically you will load an [Studio::EventDescription](https://fmod.com/resources/documentation-api?version=2.0&page=studio-api-eventdescription.html) from a [Studio::Bank](https://fmod.com/resources/documentation-api?version=2.0&page=studio-api-bank.html). Then you will use the [Studio::EventDescription](https://fmod.com/resources/documentation-api?version=2.0&page=studio-api-eventdescription.html) to create an [Studio::EventInstance](https://fmod.com/resources/documentation-api?version=2.0&page=studio-api-eventinstance.html). Then to play the event, you call [Studio::EventInstance::start](https://fmod.com/resources/documentation-api?version=2.0&page=studio-api-eventinstance.html#studio_eventinstance_start).

[https://fmod.com/resources/documentation-api?version=2.0&page=studio-guide.html#getting-started](https://fmod.com/resources/documentation-api?version=2.0&page=studio-guide.html#getting-started)

Using strings when calling the API isn’t the most efficient, so we also expose methods for using ID’s which is generally much faster. These ID’s are stored in the desctiptions.
