# FMOD Tip - Gitignore for the FMOD Integration in Unity (FMOD Unity Gitignore)

**URL:** https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283
**Category:** Unity
**Tags:** unity, csharp
**Created:** [October 11, 2020, 9:35pm UTC](https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283 "2020-10-11T21:35:12Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![Paalo](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/paalo/32/616_2.png) [@Paalo](https://qa.fmod.com/u/Paalo)
#### Post date: [October 11, 2020, 9:35pm UTC](https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283/1 "2020-10-11T21:35:12Z")

</div>

Hi!  
I just wanted to share the `.gitignore` that I’ve been using when implementing FMOD in Unity.

# FMOD Gitignore Lines

Add these lines to your git-/hg-/collab-ignore file:

```auto
### FMOD Unity Integration ###
# Never ignore DLLs in the FMOD subfolder, so make sure that the FMOD-folder is in the correct path.
!/[Aa]ssets/Plugins/FMOD/**/*.dll

# Don't ignore images and gizmos used by FMOD in the Unity Editor
!/[Aa}ssets/Gizmos/FMOD/*
!/[Aa}ssets/Editor Default Resources/FMOD/*

# Ignore the Cache-file since it is updated locally either way
/[Aa]ssets/**/FMODStudioCache.asset
/[Aa]ssets/**/FMODStudioCache.asset.meta
/[Aa]ssets/Plugins/FMOD/Cache.meta
/[Aa]ssets/Plugins/FMOD/Cache/Editor.meta

# Log-files
fmod.log
fmod_editor.log

# FMOD 1.10.x (Legacy)
/Assets/FMODAssets/*
/Assets/FMODStudioCache.meta

```

Here’s an explanation as to why I’m _explicitly_ telling Git to NOT ignore any `.dll`-files in the `Assets/Plugins/FMOD/`-folders:

> [@FMOD Tip - Possible fix to \`DllNotFoundException: fmodstudioL\`](https://qa.fmod.com/t/fmod-tip-possible-fix-to-dllnotfoundexception-fmodstudiol/16284):
>
> Sometimes when I was implementing FMOD into Unity, the integration would work fine for me, but my teammates would have Unity Editor spew out +9999 DllNotFoundException: fmodstudioL-errors when they pulled the implementation of the FMOD Integration from source control (Git). Nobody knew why the issue was happening and it was starting to make me hesitant at implementing FMOD in a Unity project, since it started to become equivalent to spending a day or two of just getting the integration to work …

# Full Fmod Unity Gitignore

Here’s a full gitignore which you can put at the root of your Unity-project (ie. one folder _up_ from `/Assets/`) when creating a new Unity project which will use FMOD:  
[.gitignore with fmod.txt](https://qa.fmod.com/uploads/short-url/EBg0b8aLkOzPzLGqDKBA4qRb2W.txt) (1.1 KB)

Just rename the file to `.gitignore.` (with the dot at the end!) and it will “become” a proper gitignore-file.

Or you can copy-paste the text from here:

```auto
[Ll]ibrary/
[Tt]emp/
[Tt]emp.meta
[Oo]bj/
[Bb]uild/
[Bb]uilds/
Assets/AssetStoreTools*

# Visual Studio cache directory
.vs/

# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.opendb

# Unity3D generated meta files
*.pidb.meta
*.pdb.meta

# Unity3D Generated File On Crash Reports
sysinfo.txt

# Builds
*.apk
*.unitypackage

# Mac stuff
.DS_Store
.bak
.BAK

### FMOD Unity Integration ###
# Never ignore DLLs in the FMOD subfolder, so make sure that the FMOD-folder is in the correct path.
!/[Aa]ssets/Plugins/FMOD/**/*.dll

# Don't ignore images and gizmos used by FMOD in the Unity Editor
!/[Aa}ssets/Gizmos/FMOD/*
!/[Aa}ssets/Editor Default Resources/FMOD/*

# Ignore the Cache-file since it is updated locally either way
/[Aa]ssets/**/FMODStudioCache.asset
/[Aa]ssets/**/FMODStudioCache.asset.meta
/[Aa]ssets/Plugins/FMOD/Cache.meta
/[Aa]ssets/Plugins/FMOD/Cache/Editor.meta

# Log-files
fmod.log
fmod_editor.log

# FMOD 1.10.x (Legacy)
/Assets/FMODAssets/*
/Assets/FMODStudioCache.meta

```

_ **Gitignore location:** _

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

---

<div class="post-metadata">

### Author: ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)
#### Post date: [October 11, 2020, 11:52pm UTC](https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283/2 "2020-10-11T23:52:21Z")

</div>

Thanks for sharing, we’ll add some of this to our documentation to help others.

---

<div class="post-metadata">

### Author: ![Paalo](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/paalo/32/616_2.png) [@Paalo](https://qa.fmod.com/u/Paalo)
#### Post date: [October 12, 2020, 7:07am UTC](https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283/3 "2020-10-12T07:07:17Z")

</div>

Awesome! Looking forward to seeing it in the official docs 🙂

/Pablo

---

<div class="post-metadata">

### Author: ![HeathClose](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/heathclose/32/1227_2.png) [@HeathClose](https://qa.fmod.com/u/HeathClose)
#### Post date: [October 16, 2020, 1:21pm UTC](https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283/4 "2020-10-16T13:21:14Z")

</div>

Awesome! There’s the ultimate .gitignore that I use now, over at [https://github.com/github/gitignore/blob/master/Unity.gitignore](https://github.com/github/gitignore/blob/master/Unity.gitignore)  
this will be a great addition to it

---

<div class="post-metadata">

### Author: ![jorickbronius](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jorickbronius/32/503_2.png) [@jorickbronius](https://qa.fmod.com/u/jorickbronius)
#### Post date: [October 18, 2020, 8:38am UTC](https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283/5 "2020-10-18T08:38:15Z")

</div>

Many thanks Paalo!

---

<div class="post-metadata">

### Author: ![Paalo](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/paalo/32/616_2.png) [@Paalo](https://qa.fmod.com/u/Paalo)
#### Post date: [October 18, 2020, 9:39am UTC](https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283/6 "2020-10-18T09:39:39Z")

</div>

Happy to help @jorickbronius 🙂

---

<div class="post-metadata">

### Author: ![Thaerdr](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/thaerdr/32/338_2.png) [@Thaerdr](https://qa.fmod.com/u/Thaerdr)
#### Post date: [October 18, 2020, 1:50pm UTC](https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283/7 "2020-10-18T13:50:41Z")

</div>

thanks Paalo

---

<div class="post-metadata">

### Author: ![chocobo](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@chocobo](https://qa.fmod.com/u/chocobo)
#### Post date: [January 13, 2021, 11:32am UTC](https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283/8 "2021-01-13T11:32:26Z")

</div>

I’m new to FMOD unity integration and git. Glad I found this info.

Sorry if it’s obvious, but does it mean the following steps will ensure every member has a working, FMOD integrated project?

1. I clone the team’s repo
2. Update and push .gitignore
3. I import the FMOD unity integration package locally
4. Set project & build path
5. Push for everyone

Or do they have to manually import the integration package at some point?

---

<div class="post-metadata">

### Author: ![Paalo](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/paalo/32/616_2.png) [@Paalo](https://qa.fmod.com/u/Paalo)
#### Post date: [January 13, 2021, 1:10pm UTC](https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283/9 "2021-01-13T13:10:36Z")

</div>

@chocobo that’s correct, if you follow those steps then your teammates will get the FMOD Unity Integration when you push it to them (Step 5 on your list) 🙂

Happy to help!

---

<div class="post-metadata">

### Author: ![chocobo](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@chocobo](https://qa.fmod.com/u/chocobo)
#### Post date: [January 15, 2021, 11:37pm UTC](https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283/10 "2021-01-15T23:37:10Z")

</div>

So upon further investigation, I believe the best way is a hybrid between pushing everything on git and doing manual integration by each member.

The problem with the push-pull-only approach is that each team has its own .gitignore setup, which would likely cause some part of the FMOD integration to not be tracked besides the .dll, which we tried did break the integration. Even using the community-maintained .gitignore [here](https://github.com/github/gitignore/blob/master/Unity.gitignore) while including the .dll caused the breakage.

Another problem is with /Assets/Plugins/FMOD/lib, where the bulk of the integration resides (close to 400MB) but won’t change during the course of development, only slowing down git.

What I did was to add a line to ignore /Assets/Plugins/FMOD/lib, and then let teammates install the integration themselves, and it worked on everyone’s systems.

A caveat of this approach though, is if you ever want to delete the integration, you’ll have to go through extra steps on each person’s system, or completely remove the repo and clone again from earlier state without the integration.

> TL;DR start to finish steps

On your end:

1. Clone the team’s repo
2. Update .gitignore with the lines suggested by @Paalo and;
3. Add `/[Aa]ssets/Plugins/FMOD/*`

> In FMOD, the goal is to establish sound bank build path & separate it and the FMOD project to make it easier for git

1. Open FMOD
2. Create a new project with at least some sound in it, or use the example project for testing purposes
3. Edit \> Preference \> Build \> Built banks output directory
4. Under the same tab \> Project platforms \> Desktop \> set to Stereo  
(Down the road, make sure everyone has their Unity \> Edit \> Project Settings \> Default Speaker Mode set to the same thing)
5. Navigate to repo root, create new folder (e.g. AssetsFMOD) and select
6. File \> Build
7. Open Unity and load the team’s project
8. Load a scene
9. Download and import the FMOD unity integration package (At some point you have to let every team member have this package themselves)
10. Follow official doc in setting up everything and putting sound in the scene  
[https://www.fmod.com/resources/documentation-unity?version=2.1&page=user-guide.html](https://www.fmod.com/resources/documentation-unity?version=2.1&page=user-guide.html)
11. Save, commit and push  
(If you’re using example project, the sound bank will require the use of git lfs. We added \*.bank to .gitattribute to track all sound bank changes on our lfs service)

> What you pushed will not be working on other machines due to .gitignore and that’s where manual integration comes into play

On teammates’ end:

1. Pull
2. Open Unity project  
(At this point since it’s broken, all the sound emitters will fall back to null/ produce error messages)
3. import FMOD integration package
4. Set bank path as you did with the help of same official doc
5. git reset --hard
6. Return to project and they should have it working. Some teammates of mine had to set the bank path again to make it work.

---

<div class="post-metadata">

### Author: ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)
#### Post date: [January 17, 2021, 11:43pm UTC](https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283/11 "2021-01-17T23:43:44Z")

</div>

Usually we’d expect people to commit their .gitignore to git so everyone is setup correctly. There is a section in our [user guide](https://fmod.com/resources/documentation-unity?version=2.1&page=user-guide.html#using-source-control) that gives an example addition to add to your shared gitignore correctly permitting the FMOD libs (and other files) even if they are excluded more globally. This addition is compatible with the Unity master [.gitignore](https://github.com/github/gitignore/blob/master/Unity.gitignore).

This is the recommended workflow so that the rest of the team doesn’t need to deal with FMOD integration. It also means when FMOD is updated, the change is rolled out to all instead of asking everyone to make changes (potentially leaving some people on the wrong version).

---

<div class="post-metadata">

### Author: ![Alexey1](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@Alexey1](https://qa.fmod.com/u/Alexey1)
#### Post date: [November 24, 2021, 4:38am UTC](https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283/12 "2021-11-24T04:38:01Z")

</div>

Do you have to put the path before the exclamation mark too?

# Never ignore DLLs in the FMOD subfolder, so make sure that the FMOD-folder is in the correct path.

C:/XssR/IAM6/!/[Aa]ssets/Plugins/FMOD/\*\*/\*.dll

---

<div class="post-metadata">

### Author: ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)
#### Post date: [November 24, 2021, 5:04am UTC](https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283/13 "2021-11-24T05:04:00Z")

</div>

No, the paths are relative to the .gitignore file, so for you, place the file in C:/XssR/IAM6

---

<div class="post-metadata">

### Author: ![Alexey1](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@Alexey1](https://qa.fmod.com/u/Alexey1)
#### Post date: [November 24, 2021, 6:28am UTC](https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283/14 "2021-11-24T06:28:25Z")

</div>

Thank u!

---

<div class="post-metadata">

### Author: ![AArtlone](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@AArtlone](https://qa.fmod.com/u/AArtlone)
#### Post date: [December 8, 2021, 3:43pm UTC](https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283/15 "2021-12-08T15:43:21Z")

</div>

Hey, I am just starting to use FMOD and I am running into a small issue.

So I have Unity opened with FMOD for Unity package imported.

I have set up the gitignore according to your advice.

Then when I switch a branch, one of the dll files is not removed and is being transferred to the branch that I have switched to. Specifically, its the Assets/Plugins/FMOD/platforms/win/lib/x86\_64/fmodstudioL.dll

Obviously, if I first close Unity and then switch the branch this does not happen.

Of course, I could do this every time I need to switch a branch, but it is kind of annoying. Does anyone know of any fix for this?

Thanks in advance.

---

<div class="post-metadata">

### Author: ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)
#### Post date: [December 14, 2021, 5:38am UTC](https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283/16 "2021-12-14T05:38:22Z")

</div>

Just linking in the response from your other post here:

> [@FMODStudiol.dll file stays in the project when switching branches](https://qa.fmod.com/t/fmodstudiol-dll-file-stays-in-the-project-when-switching-branches/18069/2):
>
> That DLL will be the DLL that Unity is using to run FMOD in the background. It cannot release it whilst the Unity project is open, which is by design, so you will need to close Unity before changing branches.

---

<div class="post-metadata">

### Author: ![awdsasdaw](https://avatars.discourse-cdn.com/v4/letter/a/9f8e36/32.png) [@awdsasdaw](https://qa.fmod.com/u/awdsasdaw)
#### Post date: [August 2, 2024, 9:45pm UTC](https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283/17 "2024-08-02T21:45:15Z")

</div>

If there is the following line in the git: `/Assets/FMODAssets/*`, doesn’t that mean my sound colleague and I won’t be able to share assets? If so, what is the best way to handle this situation?

---

<div class="post-metadata">

### Author: ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)
#### Post date: [August 6, 2024, 4:52am UTC](https://qa.fmod.com/t/fmod-tip-gitignore-for-the-fmod-integration-in-unity-fmod-unity-gitignore/16283/18 "2024-08-06T04:52:02Z")

</div>

Hi,

What version of FMOD and FMOD Unity integration are you using?

Could I get a screenshot of the project directory in Unity, showing the FMOD Integration and the assets you wish to share with your colleagues?

> [@awdsasdaw](#):
>
> if there is the following line in the git: `/Assets/FMODAssets/*`, doesn’t that mean my sound colleague and I won’t be able to share assets?

The referenced gitignore is no longer up to date. Please refer to our documentation here for the current verison and recommended workflow: [https://fmod.com/docs/2.03/unity/user-guide.html#using-source-control](https://fmod.com/docs/2.03/unity/user-guide.html#using-source-control)

Hope it helps, please don’t hesitate to ask if you have any questions.
