Answered
0
0

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….

  • You must to post comments
Best Answer
0
0

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

  • Dave Bristow

    Thank you Nicholas – most helpful.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.