# SetPause(false) stops the current eventInstance

**URL:** <https://qa.fmod.com/t/setpause-false-stops-the-current-eventinstance/16841>\
**Category:** Unity\
**Created:** [March 5, 2021, 1:16pm UTC](https://qa.fmod.com/t/setpause-false-stops-the-current-eventinstance/16841 "2021-03-05T13:16:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wilber92](https://avatars.discourse-cdn.com/v4/letter/w/f19dbf/32.png) [@wilber92](https://qa.fmod.com/u/wilber92)\
**Post date:** [March 5, 2021, 1:16pm UTC](https://qa.fmod.com/t/setpause-false-stops-the-current-eventinstance/16841/1 "2021-03-05T13:16:48Z")

</div>

When I call SetPause(true) I can see that the state using EventInstance.getPlaybackState() == PLAYING and the time of the eventinstance remains the same (indicating that the eventinstance has paused)

When I call SetPause(false) playback state goes to STOPPING, then STOPPED and the event doesn’t resume playing.

Is this a known bug, or am I using it incorrectly?

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![wilber92](https://avatars.discourse-cdn.com/v4/letter/w/f19dbf/32.png) [@wilber92](https://qa.fmod.com/u/wilber92)\
**Post date:** [March 6, 2021, 5:05pm UTC](https://qa.fmod.com/t/setpause-false-stops-the-current-eventinstance/16841/2 "2021-03-06T17:05:13Z")

</div>

Anyone else experiencing this problem?

---

<div class="post-metadata">

**Author:** ![alexzzen](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alexzzen/32/6825_2.png) [@alexzzen](https://qa.fmod.com/u/alexzzen)\
**Post date:** [March 7, 2021, 2:43pm UTC](https://qa.fmod.com/t/setpause-false-stops-the-current-eventinstance/16841/3 "2021-03-07T14:43:25Z")

</div>

If I’m reading the [docs](https://fmod.com/resources/documentation-studio?version=2.0&page=advanced-topics.html#play-state-and-fmod_studio_playback_state) right the playback state should stay the same when pausing an EventInstance.  
I can’t remember experiencing your issue. I assume that would only occur if you stop the EventInstance before un-pausing it.

---

<div class="post-metadata">

**Author:** ![wilber92](https://avatars.discourse-cdn.com/v4/letter/w/f19dbf/32.png) [@wilber92](https://qa.fmod.com/u/wilber92)\
**Post date:** [March 7, 2021, 8:03pm UTC](https://qa.fmod.com/t/setpause-false-stops-the-current-eventinstance/16841/4 "2021-03-07T20:03:52Z")

</div>

For this case I start the event instance, pause it when loading a scene, unpause it when reloading the menus scene, and the song stops.

---

<div class="post-metadata">

**Author:** ![wilber92](https://avatars.discourse-cdn.com/v4/letter/w/f19dbf/32.png) [@wilber92](https://qa.fmod.com/u/wilber92)\
**Post date:** [March 8, 2021, 10:50am UTC](https://qa.fmod.com/t/setpause-false-stops-the-current-eventinstance/16841/5 "2021-03-08T10:50:50Z")

</div>

So I found out the issue for anyone interested.

I was calling:  
masterBus.stopAllEvents(FMOD.Studio.STOP\_MODE.ALLOWFADEOUT);  
When leaving the scene (which turned out to be old code that had been forgotten about)

This stopping the event instance when the SetPause(false) was next called by me.

Thanks for your help @alexzzen . Much appreciated!
