fmod / fmod-for-unity

FMOD Studio integration with Unity.
https://fmod.com/resources/documentation-unity
MIT License
181 stars 38 forks source link

Package Manager #29

Closed msklywenn closed 4 years ago

msklywenn commented 4 years ago

Hello,

Is there any plans to "upgrade" this fmod unity integration to the new package manager format? It would probably make it easier and less messy when integrating to other projects. I'm about to do it for our project. I can make a pull request when I'm finished if that is of any interest.

https://docs.unity3d.com/Manual/CustomPackages.html

fmod-cameron commented 4 years ago

We do have plans to make use of the Unity Package Manager in a future release.

ScallyGames commented 1 year ago

I can still not find any information on Unity Package Manager integration for the fmod unity integration.

What is the current status on this?

fmod-cameron commented 1 year ago

We have actually just added support for that in 2.02.16 https://fmod.com/docs/2.02/api/welcome-revision-history.html.

msklywenn commented 1 year ago

The update works if the package is a local folder but not if it's distant because the folder in the package cache is "immutable". It actually even makes unity crash on my computer while trying to add files to the cache. I tried putting the cache back into the project but for some reason I still don't understand, it breaks our server command line builds...

image

Connor-FMOD commented 1 year ago

Hi,

When you mention that the folder is distant, does this mean on a separate drive? I could not reproduce the error while having the FMOD integration on my Desktop.

msklywenn commented 1 year ago

No I meant it’s in a git repo. But it could also be any kind of remote storage that unity has to download.

Connor-FMOD commented 1 year ago

Hi,

I see, would it be possible to see the directory including the Unity project and FMOD package? Are you experiencing this error after cloning the repo or all the time? If the FMOD Integration is not removed from the Unity project do you still experience this issue?

msklywenn commented 1 year ago

I don't clone the repo at all, Unity does. I think it does it only once and then stores in Library/PackageCache. The issue only happens with FMOD's unity package stored in a git repo.

Actually, if you could set up this repo in such a way that it could be integrated directly in Unity, it would be nice. Like Steamworks.net does: https://github.com/rlabrecque/Steamworks.NET/tree/master/com.rlabrecque.steamworks.net Integrating this is only a matter of adding "com.rlabrecque.steamworks.net": "https://github.com/rlabrecque/Steamworks.NET.git?path=com.rlabrecque.steamworks.net", to the project's Package/manifest.json.

There would still the issue of the private console plugins, but maybe that could be achieved too with ssh keys on private repos or something?

Git Package Documentation: https://docs.unity3d.com/Manual/upm-git.html

Connor-FMOD commented 1 year ago

Hi,

Thank you for the information.

Unfortunately, we will not be able to integrate FMOD directly into Unity.

Again, I was not able to reproduce the crash. Would it be possible to get access to the repo that you are using?

msklywenn commented 1 year ago

Huh? Who talked about integrating fmod directly into unity? I'll make you a repro project once I get the time...

Connor-FMOD commented 1 year ago

Apologies, I meant to repo. Thank you for setting that up.

msklywenn commented 1 year ago

I forked this repo to add a package.json and my quick fix in a branch. I also created an empty unity project that points to my forked repo. If you pull that project and open it with Unity, you will be greated with this magnificent out of memory crash from Unity. Of course that crash shouldn't happen, but it is just a side effect of the fmod plugin/package trying to create files in a read-only area of the asset database. image

If you reset to the previous commit in my empty project repository, it will use my quick fix branch. This time, unity will open fine, FMOD will show its setup window and an FMOD cache and settings will be created in the project folder. This should be the right behaviour in my opinion. Otherwise, packages are not that useful...

This way, integrating FMOD is just a matter of adding "com.fmod.unity": "https://github.com/msklywenn/fmod-for-unity.git?path=Assets/Plugins#project-cache" to the manifest.json of any unity project. IMHO, It's the easiest and fastest way.

Connor-FMOD commented 1 year ago

Hi,

Thank you very much for that. I was able to reproduce the issue.

Unfortunately, this repo wasn't meant to be directly integrated into a Unity project so the functionality you are looking for will not be implemented at this time. If we do look into adding this feature I will update this thread.

Again, thank you for all the work.