# Start/Stop loooping event instances

**URL:** <https://qa.fmod.com/t/start-stop-loooping-event-instances/12534>\
**Category:** Unity\
**Created:** [June 15, 2016, 8:57pm UTC](https://qa.fmod.com/t/start-stop-loooping-event-instances/12534 "2016-06-15T20:57:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_Bristow](https://avatars.discourse-cdn.com/v4/letter/d/ce73a5/32.png) [@Dave\_Bristow](https://qa.fmod.com/u/Dave_Bristow)\
**Post date:** [June 15, 2016, 8:57pm UTC](https://qa.fmod.com/t/start-stop-loooping-event-instances/12534/1 "2016-06-15T20:57:51Z")

</div>

When starting a looping event from script in Unity (not using Studio Emitter; not using PlayOneShot) sound always plays from 0,0,0, rather than the object’s transform. I can attach gameObject position easily when using the OneShot code, well explained in tutorials, but how to attach objects’ transform position when starting Event Instances? Starting looping sound events from Studio Emitter works intuitively, sound is attached to gameobject’s position OK, but these events can only start or stop with trigger, collision and level from the scene editor. So, I simply want to start/stop a looping FMOD event sound that is attached to a 3D gameobject, from a script. It must be easy right - I’m still new to this and old-ish, but willing to learn…

---

<div class="post-metadata">

**Author:** ![nick1](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@nick1](https://qa.fmod.com/u/nick1)\
**Post date:** [June 16, 2016, 12:29am UTC](https://qa.fmod.com/t/start-stop-loooping-event-instances/12534/2 "2016-06-16T00:29:35Z")

</div>

To easily update looping instances use RuntimeManager.AttachInstanceToGameObject(). When you want to stop the loop you can call RuntimeManager.DetachInstanceFromGameObject().

---

<div class="post-metadata">

**Author:** ![Dave\_Bristow](https://avatars.discourse-cdn.com/v4/letter/d/ce73a5/32.png) [@Dave\_Bristow](https://qa.fmod.com/u/Dave_Bristow)\
**Post date:** [June 16, 2016, 3:16am UTC](https://qa.fmod.com/t/start-stop-loooping-event-instances/12534/3 "2016-06-16T03:16:10Z")

</div>

> [@](#):
>
> To easily update looping instances use RuntimeManager.AttachInstanceToGameObject(). When you want to stop the loop you can call RuntimeManager.DetachInstanceFromGameObject().

Thank you Nicholas - most helpful.
