Thanks for the reply, I think I need to describe a bit more the results of my current quest.
First is my purpose, I want to convert FMOD into a Unity Package and version control it via Git.
After following the steps provided in the documentation so far, I was able to successfully make the Unity Package.
After I uploaded it to Git, I was also able to install it by adding a git URL to UPM.
However, it seems that for Unity, if a Unity Package is installed via a git URL, all of its files will be placed in the {ProjectName}\Library\PackageCache
directory, and all of the files there will not be editable via the Unity Editor.
I tried ignoring the Cache
and Resources
folders and leaving them out of the Unity Package, but this causes Unity to output a lot of Warnings in the Console.
I noticed that you mentioned
Cache
and Resources
will only contain files that are generated locally, depending on the settings in Unity.
But I tried and couldn’t find anything like that, can you provide more information?
Also, if you add the Unity Package to git, it prompts a message after installation. I found two posts in the forum for the same issue:
- Incorrect line endings in Fmod plugin bundles - FMOD Studio - FMOD Forums
- Repair FMOD Libraries warning still keeps showing after click repair button - Unity - FMOD Forums
I followed the instructions in the posts and added the .gitattributes
file, but still have the same problem.
I double-checked, through the Unity Console messages, and comparing the folders, and realized that it was not the three folders:
- Packages/{UnityPackageName}/FMOD/platforms/mac/lib/fmodstudio.bundle
- Packages/{UnityPackageName}/FMOD/platforms/mac/lib/fmodstudioL.bundle
- Packages/{UnityPackageName}/FMOD/platforms/mac/lib/resonanceaudio.bundle
Instead, it was the three files:
- Packages/{UnityPackageName}/FMOD/platforms/mac/lib/fmodstudio.bundle/Contents/Info.plist
- Packages/{UnityPackageName}/FMOD/platforms/mac/lib/fmodstudioL.bundle/Contents/Info.plist
- Packages/{UnityPackageName}/FMOD/platforms/mac/lib/resonanceaudio.bundle/Contents/Info.plist
So I changed the contents of the .gitattributes
file to *.plist text eol=lf
.
But the problem is still not solved.
I double-checked the files again and found that the local files were LF,
uploaded to git and then downloaded were still LF,
and for some reason installing via UPM made them CRLF
first (in {ProjectName}\Library\PackageCache
folder).
So I’m not sure if the problem belongs to FMOD, or Git, or UPM.
Regardless of the outcome, thanks again for your reply.