[Bug] FMOD and source control -- all FMOD components are now Missing (Mono Script)

Hello,

I am having an issue with the FMOD integration with Unity and source control, as the FMOD components that were attached to the game objects have been replaced with a Missing (Mono Script) warning.
Screenshot 2023-01-25 at 17.59.13

Am I doing something wrong with the source control or the set up of FMOD? I’ve downloaded FMOD via the website and imported it as a custom package.

Versions

FMOD Studio Unity Integration v 2.02.11
Unity v 2021.3.14f1
For source control – Git, Git LFS, hosted in Github
MacOS Monterey 12.6.2

To reproduce

  1. Have the FMOD settings point to soundbanks in a top level directory using the Single Platform Build source type.

    Screenshot 2023-01-25 at 19.02.26
  2. Add an FMOD Studio Listener to the Main Camera game object.
    Screenshot 2023-01-25 at 18.57.15
  3. Add an FMOD Studio Event Emitter (sound from Example project provided by FMOD).
    Screenshot 2023-01-25 at 18.57.05
  4. Save the Scene
  5. Commit and push the changes (remember to save the Scene, unlike me, the link.xml refers to the Addressables, which is an area I’m not familiar with – could this be an issue?)
    Screenshot 2023-01-25 at 19.04.46
    Screenshot 2023-01-25 at 19.05.38
  6. Delete repo directory on local machine and git clone the project.
  7. Open the project – click “Update Metadata” on the popup.
    Screenshot 2023-01-25 at 19.16.18
  8. Relink the soundbanks
    Screenshot 2023-01-25 at 19.17.18
  9. FMOD Wizard will then ask me to change the Unity Listener with the FMOD Listener. This is strange, because when I open up the Centre Scene, there is no Unity Listener on the Main Camera – the Wizard then updates to say that there is no Listener at all. In the screenshot, you can see that the component (Script) is now missing.
  10. This is the same for the Player object – the FMOD component is now missing.
    Screenshot 2023-01-25 at 19.20.57

Additional info
The Centre.unity file does have a corresponding .meta file:
Screenshot 2023-01-25 at 19.13.07

I had a proof of concept that I mocked up before that used the platformer tutorial from Unity and FMOD and everything there seemed to work with source control, so I’ve just rebuilt the game by moving my ProjectSettings and Assets from my game to the proof of concept. It seems to work now, so there must have been something in the setup of my game that caused this, but not sure what.

This seems to be an issue with your source control - I’ve been able to reproduce your exact set of issues by adding the line *.meta to my .gitignore, which will exclude all .meta files in the project.

Unity uses an ID corresponding to a script to track what is attached to a given GameObject. This ID is stored in the script’s .meta file. If you’ve ignored the .meta files, when you pull your project and reopen it, Unity regenerates the .meta files for any objects that are lacking them; this works fine for Unity scripts, but breaks the ability to load FMOD Scripts attached to GameObjects.

Reimporting your FMOD Studio Unity Integration should fix the script loading issue. I would also check your .gitignore file (or anything else that could be affecting it) to see whether you’ve somehow excluded either FMOD’s .meta files, or all .meta files; I believe GitHub’s default Unity .gitignore only excludes .meta files for Unity3D assets and some auto-generated android assets.