# Getting if an Event Instance is paused

**URL:** https://qa.fmod.com/t/getting-if-an-event-instance-is-paused/17312
**Category:** Unity
**Tags:** csharp, unity
**Created:** [June 9, 2021, 9:04am UTC](https://qa.fmod.com/t/getting-if-an-event-instance-is-paused/17312 "2021-06-09T09:04:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![VSABATE](https://avatars.discourse-cdn.com/v4/letter/v/47e85d/32.png) [@VSABATE](https://qa.fmod.com/u/VSABATE)
#### Post date: [June 9, 2021, 9:04am UTC](https://qa.fmod.com/t/getting-if-an-event-instance-is-paused/17312/1 "2021-06-09T09:04:25Z")

</div>

I want to check if an EventInstance object is paused. I’ve seen that I need to use the  
EventObject.getPaused(), but I need to send an out parameter and I’m not familiar with them.  
What am I supposed to do?

```auto
                bool aux_BoardMusic = SoundManager.instance.Music_Board.getPaused();
                if (aux_BoardMusic)
                {
                    SoundManager.instance.Music_Board.setPaused(false);
                }

```

---

<div class="post-metadata">

### Author: ![Alcibiade](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alcibiade/32/4284_2.png) [@Alcibiade](https://qa.fmod.com/u/Alcibiade)
#### Post date: [June 9, 2021, 9:26am UTC](https://qa.fmod.com/t/getting-if-an-event-instance-is-paused/17312/2 "2021-06-09T09:26:12Z")

</div>

The “out” only indicates the variable (output) on which the get value will be written.  
So I think the right syntax should rather be something like:

```auto
SoundManager.instance.Music_Board.getPaused(aux_BoardMusic);

```

I’m not a Unity nor a C# user, though. There could be some subtleties about variable declaration and type that I’m not aware of…

---

<div class="post-metadata">

### Author: ![Grhyll](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/grhyll/32/2322_2.png) [@Grhyll](https://qa.fmod.com/u/Grhyll)
#### Post date: [June 9, 2021, 2:13pm UTC](https://qa.fmod.com/t/getting-if-an-event-instance-is-paused/17312/3 "2021-06-09T14:13:49Z")

</div>

You can either use a previously declared variable:

```auto
bool isPaused;
RESULT r = SoundManager.instance.Music_Board.getPaused(out isPaused);
if(r == RESULT.OK)
    Debug.Log("IsPaused: " + isPaused);

```

Or even (since recently) declare it during the call itself:

`RESULT r = SoundManager.instance.Music_Board.getPaused(out bool isPaused);`
