# Values say they're changing on parameter, but they're not applying

**URL:** https://qa.fmod.com/t/values-say-theyre-changing-on-parameter-but-theyre-not-applying/12817
**Category:** Unity
**Created:** [November 16, 2016, 5:38am UTC](https://qa.fmod.com/t/values-say-theyre-changing-on-parameter-but-theyre-not-applying/12817 "2016-11-16T05:38:07Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Snoopy20111](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Snoopy20111](https://qa.fmod.com/u/Snoopy20111)
#### Post date: [November 16, 2016, 5:38am UTC](https://qa.fmod.com/t/values-say-theyre-changing-on-parameter-but-theyre-not-applying/12817/1 "2016-11-16T05:38:07Z")

</div>

I am new to Fmod and C# in general, so bear with me when I say that (I think) I’m changing a parameter in Unity during playback, and it isn’t responding properly. I’ve confirmed that the input values I need are being properly calculated, and that the values I’m setting are being changed to the proper numbers. I think I might not be referring to the event or parameter properly but because I don’t get any errors I have no idea.

```
using UnityEngine;
using System.Collections;

public class VolumeLookController : MonoBehaviour {

	public GameObject musicBox;
	public GameObject myCamera;
	private float distance;
	float angleAway;
	private FMOD.Studio.EventInstance Music;
	private FMOD.Studio.ParameterInstance LookVolume;

	// Use this for initialization
	void Start () {
		Music = FMODUnity.RuntimeManager.CreateInstance ("event:/Music/Music");
		Music.getParameter ("LookVolume", out LookVolume);

	}
	
	// Update is called once per frame
	void Update () {
		
		angleAway = Vector3.Angle(myCamera.transform.forward, musicBox.transform.position - myCamera.transform.position)/180;
		float printOut;
		//LookVolume.setValue (angleAway);
		//LookVolume.getValue (out blegh);

		Music.setParameterValue ("LookVolume", angleAway);
		Music.getParameterValue ("LookVolume", out printOut);

		print (printOut);
	}
}

```

With this code I’m fed a large stream of numbers confirming that LookVolume is being set to the proper numbers, but the game is unresponsive. Both methods (commented and uncommented) used for setting and printing the value seem to act identically, and neither works properly. What am I missing?

---

<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: [November 17, 2016, 1:09am UTC](https://qa.fmod.com/t/values-say-theyre-changing-on-parameter-but-theyre-not-applying/12817/2 "2016-11-17T01:09:03Z")

</div>

You are correct about both the methods used for getting and setting the parameter values.

If this is all the code from the script, I believe you are just missing a call:  
Music.start();

After creating the instance at some point.

---

<div class="post-metadata">

### Author: ![DDAUDIOSOLUTIONS](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@DDAUDIOSOLUTIONS](https://qa.fmod.com/u/DDAUDIOSOLUTIONS)
#### Post date: [March 14, 2017, 12:08pm UTC](https://qa.fmod.com/t/values-say-theyre-changing-on-parameter-but-theyre-not-applying/12817/3 "2017-03-14T12:08:30Z")

</div>

Maybe i think that, getParameterValue, need to adress value, and you only have on?

RESULT Studio.EventInstance.getParameterValue(  
string name,  
out float value,  
out float finalvalue  
);

Music.getParameterValue (“LookVolume”, out printOut, out float finalvalue);

don’t you have an error in Unity Console?
