# Fmod Unity Loop

**URL:** https://qa.fmod.com/t/fmod-unity-loop/19059
**Category:** Unity
**Tags:** unity, csharp
**Created:** [July 27, 2022, 4:43am UTC](https://qa.fmod.com/t/fmod-unity-loop/19059 "2022-07-27T04:43:07Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Roohul](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Roohul](https://qa.fmod.com/u/Roohul)
#### Post date: [July 27, 2022, 4:43am UTC](https://qa.fmod.com/t/fmod-unity-loop/19059/1 "2022-07-27T04:43:07Z")

</div>

How to set and control loop of event in c#. Is there an option that lets me control if I want to loop audio or don’t want to loop it.

---

<div class="post-metadata">

### Author: ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)
#### Post date: [July 31, 2022, 11:16pm UTC](https://qa.fmod.com/t/fmod-unity-loop/19059/2 "2022-07-31T23:16:02Z")

</div>

Hi,

There are a couple of ways you can do this:

A Loop region, explained in the [Studio | Glossary](https://fmod.com/docs/2.02/studio/glossary.html#loop-region), can be triggered with a `parameter` controlled in C# by the game. Allowing for the `loop` behavior of the `event` to be changed.

Another option may be creating a `sound` via a script, which will allow you to set the looping option in code but will require you to be a lot more involved in its setup and maintenance. Creating a sound is explained under [Studio API | System](https://fmod.com/docs/2.02/api/studio-api-system.html#studio_system_create). You can use the `FMODUnity.RuntimeManager.CoreSystem` to create the sound.

Hope this helps!
