# FMOD Unity parameter

**URL:** <https://qa.fmod.com/t/fmod-unity-parameter/15787>\
**Category:** Unity\
**Created:** [May 18, 2020, 1:06pm UTC](https://qa.fmod.com/t/fmod-unity-parameter/15787 "2020-05-18T13:06:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dajh18](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@dajh18](https://qa.fmod.com/u/dajh18)\
**Post date:** [May 18, 2020, 1:06pm UTC](https://qa.fmod.com/t/fmod-unity-parameter/15787/1 "2020-05-18T13:06:58Z")

</div>

I don’t know what I’m doing wrong, I’ve looked endlessly on the API and unity and still my FMOD params won’t even budge. What about this code is wrong?

public class FMODPlayer : MonoBehaviour  
{  
float VA = 0;  
float VA2 = 1;

```
FMOD.Studio.EventInstance ambiance;

// Start is called before the first frame update
 void Start()
{
    blam = FMODUnity.RuntimeManager.CreateInstance("event:/SFX/rotation");
    ambiance = FMODUnity.RuntimeManager.CreateInstance("event:/Ambience/Water");
    ambiance.set3DAttributes(FMODUnity.RuntimeUtils.To3DAttributes(gameObject.transform));
    blam.set3DAttributes(FMODUnity.RuntimeUtils.To3DAttributes(gameObject.transform));
    ambiance.getParameterByName("VA", out VA);
    ambiance.start();
   /* ambiance.setParameterByName("VA", 0, false);*/
}

// Update is called once per frame
 void Update()
{

    if (Input.GetKey(KeyCode.Space))
    {
        
        FMOD.RESULT result = ambiance.setParameterByName("VA", VA2, false);
        Debug.Log("Spaceyman");
        Debug.Log(ambiance);
        Debug.Log(result);
    }

}

private void PlayParam()
{
    
}

```

}

---

<div class="post-metadata">

**Author:** ![Paalo](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/paalo/32/616_2.png) [@Paalo](https://qa.fmod.com/u/Paalo)\
**Post date:** [May 24, 2020, 3:03am UTC](https://qa.fmod.com/t/fmod-unity-parameter/15787/2 "2020-05-24T03:03:01Z")

</div>

Have you tried getting the _parameter value_ after you’ve set it in your Update()-method? What value does it show you?

```auto

if (Input.GetKey(KeyCode.Space))
{
    //Setting the parameter to a new value
    FMOD.RESULT result = ambiance.setParameterByName("VA", 1f);

    //This print here
    ambiance.getParameterByName("VA", out float changedParamValue);
    Debug.Log($"ChangedParamValue: {changedParamValue}");

    Debug.Log("Spaceyman");
    Debug.Log(ambiance);
    Debug.Log(result);
}

```

Here’s also some standard-checks I usually do:

- Double-check that the parameter in FMOD is called exactly the same as in the game code (ie. `"VA"`)?
- Have I built the banks again between tests?

Tell me how it goes! 🙂

/Pablo
