Plugin Base Path Hardcoding

In RunTimeUtils.cs the Plugin Base Path is set by two hardcoded values. The project I am working on requires plugins to be in a git submodule with the configuration data in the main repo. I noticed when I moved the plugin to the submodule, the event reference inspector stopped working because assets couldn’t be found. Is there a way I can work around this or any plans to make it configurable in the future?

FMOD for Unity 2.02.16 added the ability to move the plugin folder anywhere within the Unity Assets folder. Additionally, 2.02.20 allows UPM to be used to import an FMOD plugin folder from elsewhere (on disk, git URL, etc.) on all platforms. If you’re not the version appropriate for your purposes, I would recommend updating to one of them (or to the latest version if possible).

However, the FMOD directory is located by folder GUID (BaseFolderGUID in RuntimeUtils.cs), so it’s important that the folder is moved to the desired location with “FMOD.meta” intact, so that the .meta file and the folder GUID contained within aren’t regenerated.

If you want to use UPM, you’ll need to do the following:

  • Create a folder ‘com.firelight.fmod-for-unity’, either in the ‘{ProjectName}/Packages’ directory, anywhere on your local disk, or in a remote Git repo.
  • Move the FMOD folder and FMOD.meta file to the new folder.
  • Create a ‘package.json’ file in the same directory as the FMOD folder.
  • Add the following to the package.json (with 2.x.y matching your plugin version):
{
    "name": "com.firelight.fmod-for-unity",
    "version": "2.x.y",
    "displayName": "FMOD for Unity"
}
  • If you are not using the ‘{ProjectName}/Packages’ directory, you’ll then need to import the plugin using UPM.

Does the package folder need to exist in the {ProjectName}/Packages root folder folder or can it live in a folder like Packages/ThirdParty/com.firelight.fmod-for-unity. We currently have a git repo that is for storing third party libraries/plugins for distribution.

If you’re using ./Packages/ThirdParty/com.firelight.fmod-for-unity, you will need to manully import it via UPM, as UPM will only automatically import packages in the root of the ./Packages folder.

Just following up on this - were you able to get the package folder importing properly using UPM? If not, is there a specific issue you’re running into?

We decided on leaving the plugin in the main assets/plugin folder. Thank you for your assistance!

1 Like