# Playing and event that is already started will not replay the event

**URL:** <https://qa.fmod.com/t/playing-and-event-that-is-already-started-will-not-replay-the-event/17921>\
**Category:** Unity\
**Tags:** unity, csharp\
**Created:** [November 8, 2021, 1:15pm UTC](https://qa.fmod.com/t/playing-and-event-that-is-already-started-will-not-replay-the-event/17921 "2021-11-08T13:15:43Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![KinanGH](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/kinangh/32/2786_2.png) [@KinanGH](https://qa.fmod.com/u/KinanGH)\
**Post date:** [November 8, 2021, 1:15pm UTC](https://qa.fmod.com/t/playing-and-event-that-is-already-started-will-not-replay-the-event/17921/1 "2021-11-08T13:15:43Z")

</div>

Hi  
In Unity, whether it’s from code or from the editor, if I play an event with Studio Event Emitter component, the event will not replay, its just do nothing.  
Is there a way to make the event either replay from start, or start another instance of the event so they get played at the same time,  
for example an event for playing bullet effect, if you play the event a second time, there will be another bullet effect that get played asynchronously with the first instance.  
Thank you.

---

<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:** [November 8, 2021, 9:47pm UTC](https://qa.fmod.com/t/playing-and-event-that-is-already-started-will-not-replay-the-event/17921/2 "2021-11-08T21:47:04Z")

</div>

Is the event oneshot (does it finish by itself)?  
Is it detected by Unity as oneshot?  
Did you limit the number of max instances of this event in FMOD Studio?

---

<div class="post-metadata">

**Author:** ![KinanGH](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/kinangh/32/2786_2.png) [@KinanGH](https://qa.fmod.com/u/KinanGH)\
**Post date:** [November 9, 2021, 8:25am UTC](https://qa.fmod.com/t/playing-and-event-that-is-already-started-will-not-replay-the-event/17921/3 "2021-11-09T08:25:35Z")

</div>

1 - honestly I don’t know what are the factors that marks the event as oneshot.  
2 - yes Unity detects the event as oneshot.  
3 - no.

---

<div class="post-metadata">

**Author:** ![KinanGH](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/kinangh/32/2786_2.png) [@KinanGH](https://qa.fmod.com/u/KinanGH)\
**Post date:** [November 11, 2021, 8:29am UTC](https://qa.fmod.com/t/playing-and-event-that-is-already-started-will-not-replay-the-event/17921/4 "2021-11-11T08:29:59Z")

</div>

It seems no one want to answer.

---

<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:** [November 11, 2021, 3:01pm UTC](https://qa.fmod.com/t/playing-and-event-that-is-already-started-will-not-replay-the-event/17921/5 "2021-11-11T15:01:53Z")

</div>

You should post a screenshot of your Studio Event Emitter Component settings, and better describe the content of your event and the wrong behavior. Does it play correctly the first time? Did you try to replay the event while the first sound is still playing? After it has stopped? etc…

---

<div class="post-metadata">

**Author:** ![KinanGH](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/kinangh/32/2786_2.png) [@KinanGH](https://qa.fmod.com/u/KinanGH)\
**Post date:** [November 13, 2021, 12:48pm UTC](https://qa.fmod.com/t/playing-and-event-that-is-already-started-will-not-replay-the-event/17921/6 "2021-11-13T12:48:46Z")

</div>

I’d be happy to attach some screenshots, but I didn’t know such problem needs such details!  
Yes it plays correctly the first time, the event plays correctly every time I play it as long as the event is not currently playing, the problem occurs when I want to replay the event while it still playing, but after its finished I can replay it correctly.  
Hope that is enough details.

Component : ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/9/9b8e79c27f9f83562547512770d010ac94f4e086.png)

Event in studio :

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/e/e3a8b731c12b3f1f9f30a928f754913eeb8cf27b.png)

as you can see the event is fairly simple.

---

<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:** [November 13, 2021, 3:10pm UTC](https://qa.fmod.com/t/playing-and-event-that-is-already-started-will-not-replay-the-event/17921/7 "2021-11-13T15:10:33Z")

</div>

Screenshots are useful because it can show details you forgot to mention.  
I’m surprised your event is marked as “stream”, though it’s only 350 ms long. The usual practice is to set as streaming assets which are long (\>10s) and not frequently accessed ; since yours is short with frequent access, it should be in RAM. Maybe that could be the reason of the lack of reactivity when playing the sound two times in a row…

---

<div class="post-metadata">

**Author:** ![KinanGH](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/kinangh/32/2786_2.png) [@KinanGH](https://qa.fmod.com/u/KinanGH)\
**Post date:** [November 13, 2021, 8:27pm UTC](https://qa.fmod.com/t/playing-and-event-that-is-already-started-will-not-replay-the-event/17921/8 "2021-11-13T20:27:03Z")

</div>

Yes I marked the audio asset manually as “stream” because it is not frequently used in my situation,  
however the problem resides even if the asset is marked non “stream”.  
I’m assuming there is an option or setting or something that can change such behavior.

---

<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:** [November 13, 2021, 9:56pm UTC](https://qa.fmod.com/t/playing-and-event-that-is-already-started-will-not-replay-the-event/17921/9 "2021-11-13T21:56:36Z")

</div>

This really sounds as if you limited the instances to 1 with stealing to none, somewhere. Even though your event is correct, check each bus of the chain in the mixer view (including master) and look for such limitation. Exemple on the master bus:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/6/6649030bf073f51aceb1ab9e40142ef12b309c59.png)

---

<div class="post-metadata">

**Author:** ![KinanGH](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/kinangh/32/2786_2.png) [@KinanGH](https://qa.fmod.com/u/KinanGH)\
**Post date:** [November 14, 2021, 8:30am UTC](https://qa.fmod.com/t/playing-and-event-that-is-already-started-will-not-replay-the-event/17921/10 "2021-11-14T08:30:31Z")

</div>

All my mixer channels’ 'max instances" property are set to “infinite”.

---

<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:** [November 14, 2021, 9:16am UTC](https://qa.fmod.com/t/playing-and-event-that-is-already-started-will-not-replay-the-event/17921/11 "2021-11-14T09:16:33Z")

</div>

Though I’m not a Unity user, I’ve tested the event emitter and it behaves as it should with oneshot events: it stacks another instance when replayed.  
A few more ideas:

- check/update the version of Unity, FMOD and integration plugin
- recreate your Unity object from scratch
- test it with other trigger methods
- recreate your FMOD event from scratch, with other and longer assets

---

<div class="post-metadata">

**Author:** ![Partymongrel](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/partymongrel/32/2754_2.png) [@Partymongrel](https://qa.fmod.com/u/Partymongrel)\
**Post date:** [November 30, 2021, 7:53pm UTC](https://qa.fmod.com/t/playing-and-event-that-is-already-started-will-not-replay-the-event/17921/12 "2021-11-30T19:53:26Z")

</div>

Sorry I’m a bit late to the party!

On the Event Emitter component it appears you do not have a Play or Stop Event selected. This could be why it is not triggering a second time, although I would be interested as to how you’re getting it to play the first time without a Play Event at least. When you start the event through code are you using .start() or .PlayOneshot()?

---

<div class="post-metadata">

**Author:** ![KinanGH](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/kinangh/32/2786_2.png) [@KinanGH](https://qa.fmod.com/u/KinanGH)\
**Post date:** [December 1, 2021, 11:08am UTC](https://qa.fmod.com/t/playing-and-event-that-is-already-started-will-not-replay-the-event/17921/13 "2021-12-01T11:08:20Z")

</div>

Welcome  
Yes in this example I don’t have Play or Stop Events, and I play the event via code using:  
sfx.Play();  
and even if the emitter has Play or Stop Events the behavior is the same.

---

<div class="post-metadata">

**Author:** ![Partymongrel](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/partymongrel/32/2754_2.png) [@Partymongrel](https://qa.fmod.com/u/Partymongrel)\
**Post date:** [December 3, 2021, 7:55pm UTC](https://qa.fmod.com/t/playing-and-event-that-is-already-started-will-not-replay-the-event/17921/14 "2021-12-03T19:55:08Z")

</div>

I would replace sfx.Play() with:

FMODUnity.RuntimeManager.PlayOneShotAttached(“_ **event path** _”, gameObject you want the sound attached to);

or if you just need a 2D sound:

FMODUnity.RuntimeManager.PlayOneShot(“_ **event path** _”);

and then remove the Event Emitter component from the Game Object in Unity. Hopefully this would work! Without seeing the code an issue may be that your sound is still playing, especially if you are not destroying or releasing the event instance then that may be the cause of your problem.

Another cause may be that your parameters are not set up right and when you change the parameters you are accidentally turning the volume of both tracks to zero. I might suggest splitting this event into two events, one for the switch on and another for off, as that might be a simpler solution than messing around with parameters (unless there are cases where you want to blend the two sounds together)
