# Problem with some parameters and getParameterByName

**URL:** <https://qa.fmod.com/t/problem-with-some-parameters-and-getparameterbyname/22581>\
**Category:** FMOD Studio\
**Created:** [February 6, 2025, 7:02pm UTC](https://qa.fmod.com/t/problem-with-some-parameters-and-getparameterbyname/22581 "2025-02-06T19:02:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AntvilStudios](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@AntvilStudios](https://qa.fmod.com/u/AntvilStudios)\
**Post date:** [February 6, 2025, 7:02pm UTC](https://qa.fmod.com/t/problem-with-some-parameters-and-getparameterbyname/22581/1 "2025-02-06T19:02:12Z")

</div>

Hi. I´m working with elevation and distance parameters which i´d like to update in real time.  
Although Unity returns the following error: [FMOD] AsyncCommand\_eventInstance\_setParameterByName::executeShadow : Parameter ‘Elevation’ is readonly.  
Same error with the distance parameter, so my first question is:  
Do elevation and distance parameters update by themselves or is it possible to do it via setParameterByName?.  
Second question is related to the first:  
I´m trying to retrieve the actual parameter value as Unity runs. I´m using getParameterByName, but it returns non-sense values, so i guess i´m doing something wrong.

My sintax is:

```auto
public void UpdateElevation(floatElevation)
        {
            float finalElevation;
            Instance.setParameterByName("Elevation", floatElevation);
            Instance.getParameterByName("Elevation", out floatelevation, out finalElevation);
            Debug.Log("Elevation is " + finalElevation);
        }

```

Thank you in advance.

---

<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:** [February 13, 2025, 3:01am UTC](https://qa.fmod.com/t/problem-with-some-parameters-and-getparameterbyname/22581/2 "2025-02-13T03:01:29Z")

</div>

The parameters `Distance` and `Elevation` are what we call built-in parameters:

> Built-in parameters are [parameters](https://www.fmod.com/docs/2.03/studio/glossary.html#parameter) whose values automatically update based on the 3D attributes of the [event instance](https://www.fmod.com/docs/2.03/studio/glossary.html#event-instance) and [listener](https://www.fmod.com/docs/2.03/studio/glossary.html#listener) in your game engine.

[https://www.fmod.com/docs/2.03/studio/parameters-reference.html#built-in-parameters](https://www.fmod.com/docs/2.03/studio/parameters-reference.html#built-in-parameters)

They are designed to be updated automatically and are not allowed to be manually set.

> [@AntvilStudios](#):
>
> I´m trying to retrieve the actual parameter value as Unity runs. I´m using getParameterByName, but it returns non-sense values, so i guess i´m doing something wrong.

Getting the parameter value for Elevation should return the elevation angle:

> The elevation parameter type is the angle between the direction the [listener](https://www.fmod.com/docs/2.03/studio/glossary.html#listener) is facing and the direction from the listener to the [event instance](https://www.fmod.com/docs/2.03/studio/glossary.html#event-instance) on the vertical (xy) plane, in degrees.
