[Ll]ibrary/
[Tt]emp/
[Tt]emp.meta
[Oo]bj/
[Bb]uild/
[Bb]uilds/
Assets/AssetStoreTools*
# Visual Studio cache directory
# 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
### 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:
Awesome! There’s the ultimate .gitignore that I use now, over at https://github.com/github/gitignore/blob/master/Unity.gitignore
this will be a great addition to it
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?
I clone the team’s repo
Update and push .gitignore
I import the FMOD unity integration package locally
Set project & build path
Push for everyone
Or do they have to manually import the integration package at some point?
@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!
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 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:
Clone the team’s repo
Update .gitignore with the lines suggested by @Paalo and;
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
Open FMOD
Create a new project with at least some sound in it, or use the example project for testing purposes
Edit > Preference > Build > Built banks output directory
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)
Navigate to repo root, create new folder (e.g. AssetsFMOD) and select
File > Build
Open Unity and load the team’s project
Load a scene
Download and import the FMOD unity integration package (At some point you have to let every team member have this package themselves)
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
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:
Open Unity project
(At this point since it’s broken, all the sound emitters will fall back to null/ produce error messages)
import FMOD integration package
Set bank path as you did with the help of same official doc
git reset --hard
Return to project and they should have it working. Some teammates of mine had to set the bank path again to make it work.
Usually we’d expect people to commit their .gitignore to git so everyone is setup correctly. There is a section in our user guide 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.
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).
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
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.
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
Hope it helps, please don’t hesitate to ask if you have any questions.