# check the parameterValue in console

**URL:** https://qa.fmod.com/t/check-the-parametervalue-in-console/13029
**Category:** Unity
**Created:** [March 10, 2017, 8:14pm UTC](https://qa.fmod.com/t/check-the-parametervalue-in-console/13029 "2017-03-10T20:14:57Z")
**Posts on this page:** 2
**Page:** 1

<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 10, 2017, 8:14pm UTC](https://qa.fmod.com/t/check-the-parametervalue-in-console/13029/1 "2017-03-10T20:14:57Z")

</div>

Hi, i would like to check that the parameterValue on trigger enter and triggerExit, is correct. I would like to see in the console with Debug.Log. But i can’t

void OnTriggerEnter (Collider hit){

```
	if (hit.GetComponent<Collider> ().CompareTag ("Player")) {

		MusicaC.mcaparam.setValue (0.12f);
		MusicaC.M_Pipes.getParameter ("MUSIC", out MusicaC.mcaparam);

		Debug.Log (MusicaC.mcaparam);

	}
}

```

The number that appear in console is 0,why???

thanks

---

<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 13, 2017, 10:57pm UTC](https://qa.fmod.com/t/check-the-parametervalue-in-console/13029/2 "2017-03-13T22:57:05Z")

</div>

It looks as though you are resetting the parameter reference rather than the value.

```
Start()
{
    // Use this once to assign a reference to the parameter.
    MusicaC.M_Pipes.getParameter ("MUSIC", out MusicaC.mcaparam);
}

OnTriggerEnter()
{
    if (hit.GetComponent<Collider> ().CompareTag ("Player"))
    {
        // Get the value of the paramter at this moment in time.
        MusicaC.mcaparam.getValue (out paramValue);
        if (paramValue == number)
        {
            MusicaC.mcaparam.setValue (0.12f);
        }
    }
}
```
