# Retrieve distance attenuation curve setting

**URL:** https://qa.fmod.com/t/retrieve-distance-attenuation-curve-setting/17076
**Category:** Unity
**Tags:** csharp, unity
**Created:** [April 20, 2021, 1:43pm UTC](https://qa.fmod.com/t/retrieve-distance-attenuation-curve-setting/17076 "2021-04-20T13:43:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Arfus](https://avatars.discourse-cdn.com/v4/letter/a/5daacb/32.png) [@Arfus](https://qa.fmod.com/u/Arfus)
#### Post date: [April 20, 2021, 1:43pm UTC](https://qa.fmod.com/t/retrieve-distance-attenuation-curve-setting/17076/1 "2021-04-20T13:43:25Z")

</div>

Hi, I want to be able to retrieve the current selected curve setting of the spatializer. Specifically, I’d like to know if the attenuation is disabled or not. Unfortunately, searching through the documentation/unity code. I was unable to find anything related to this. ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/d/d9cf89020765cd7928098e681ed5c7212d44e9e1.png)

---

<div class="post-metadata">

### Author: ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)
#### Post date: [April 22, 2021, 3:06am UTC](https://qa.fmod.com/t/retrieve-distance-attenuation-curve-setting/17076/3 "2021-04-22T03:06:35Z")

</div>

It’s currently not possible to fetch the curve at runtime, but you can sort of via scripting within the FMOD Studio application. Assuming you have already got the current event in an `event` variable and the spatializer is on the master track, you could try:

`event.masterTrack.mixerGroup.effectChain.effects[1].distanceRolloffType`

This will return the following:

```auto
0 - Default curved rolloff
1 - Linear straight line
2 - Slow start, fast end
3 - S shaped curve
4 - Off

```

---

<div class="post-metadata">

### Author: ![Arfus](https://avatars.discourse-cdn.com/v4/letter/a/5daacb/32.png) [@Arfus](https://qa.fmod.com/u/Arfus)
#### Post date: [April 22, 2021, 8:49am UTC](https://qa.fmod.com/t/retrieve-distance-attenuation-curve-setting/17076/4 "2021-04-22T08:49:49Z")

</div>

Thanks for the reply, guessing that’s the only solution for now.
