# Plugin Base Path Hardcoding

**URL:** https://qa.fmod.com/t/plugin-base-path-hardcoding/21952
**Category:** Unity
**Created:** [July 31, 2024, 3:56pm UTC](https://qa.fmod.com/t/plugin-base-path-hardcoding/21952 "2024-07-31T15:56:29Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![rwlizana](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@rwlizana](https://qa.fmod.com/u/rwlizana)
#### Post date: [July 31, 2024, 3:56pm UTC](https://qa.fmod.com/t/plugin-base-path-hardcoding/21952/1 "2024-07-31T15:56:29Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [August 1, 2024, 4:26am UTC](https://qa.fmod.com/t/plugin-base-path-hardcoding/21952/2 "2024-08-01T04:26:05Z")

</div>

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):

```auto
{
    "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.

---

<div class="post-metadata">

### Author: ![rwlizana](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@rwlizana](https://qa.fmod.com/u/rwlizana)
#### Post date: [August 1, 2024, 10:09pm UTC](https://qa.fmod.com/t/plugin-base-path-hardcoding/21952/3 "2024-08-01T22:09:37Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [August 2, 2024, 1:53am UTC](https://qa.fmod.com/t/plugin-base-path-hardcoding/21952/4 "2024-08-02T01:53:20Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [August 9, 2024, 6:31am UTC](https://qa.fmod.com/t/plugin-base-path-hardcoding/21952/5 "2024-08-09T06:31:40Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![rwlizana](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@rwlizana](https://qa.fmod.com/u/rwlizana)
#### Post date: [August 12, 2024, 3:07pm UTC](https://qa.fmod.com/t/plugin-base-path-hardcoding/21952/6 "2024-08-12T15:07:36Z")

</div>

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