dylib (.bundle file) Not Exporting to Unity Package

So I’m working on a reusable Unity library that exports as a .unitypackage and can be brought into a new or existing Unity project. One of the files in this library is a MacOS dylib module (with a .bundle extension although it isn’t a bundle that can be opened). It’s a third-party library so I can’t change the way it’s built.

Interestingly, I am able to bring it into the library project just fine. However, when I go to export it along with the other files in the project (i.e. Assets->Export Package…), I can’t select the dylib. I’m guessing it has to do with this file being a container format but I’m not sure why Unity can’t export this file into a .unitypackage.

Any help would be much appreciated!

Same Problem

I recently started using Unity 2021 on Mac Silicon and running into this problem. My .bundle will not export, it is checked in the export window but, when I go to import the package it isn’t included.

1 Like

This seems to be a new Unity bug.

I have a CI process that has been reliably building a .unitypackage from a project for several years. The project includes a Plugins folder which includes native plugins for Windows, iOS, Android, and mac OS. Just recently, in spite of the mac .bundle being in the Assets plugins folder, it is no longer being packaged by the call to AssetDatabase.ExportPackage.

This change coincides with our update from Unity 2021.3.2f1 to 2021.3.25f1. I have also tested with 2021.3.27f1 and I am getting the same result.

The bundle is correctly code-signed and has a valid bundle ID.

If I manually create the package from inside the Unity Editor, just like the previous poster, I can select the plugin.bundle file in the listing, but when I examine the unitypackage created, I can see that only an entry for the top level directory of the bundle has been created (as expected, without an asset, since its just a folder). The bundle contents (which are inside the top level folder of the bundle) are not present in the unitypackage.

What editor version are you on?

OK, downgrading to Unity 2021.3.22f1 allows the export of the bundle for me. Incidentally, this is also the last version not affected by the issue mentioned here: Import getting stuck after upgrading to 2021.2.2f1 - Unity Engine - Unity Discussions

This might be related, since it is the first version affected by this issue: Unity Issue Tracker - [macOS] .meta files are created inside a loadable plugin folders when it's imported into the project

i’m using 2021.3.25f1

Thanks! I’ll downgrade and try that.

Thank you @bleater Unity 2021.3.22f1 does in fact import/export the Mac .bundle properly.

BTW I filed a bug on this and it is in work by Unity.

1 Like

Great! Thanks again! The kingdom is safe again. :slight_smile:

I’m also affected by this bug. From the 2021.3.23 changelog:

In my case, this “fix” breaks Wwise audio middleware upgrades in the project.
Wwise has some .bundle plugin folders for Mac platform - including the main audio engine.

I’m unable to upgrade Wwise Unity Integration on Unity versions from 2021.3.23 onward.

Hi
Could you please write bug number here? so I can internally connect these two cases

Mine was https://issuetracker.unity3d.com/issues/macos-loadable-plugin-directories-fail-to-be-exported-as-unitypackage and has been marked as a duplicate of https://issuetracker.unity3d.com/issues/console-error-error-while-exporting-package-no-assets-to-export-only-folders-did-you-mean-to-use-exportpackageoptions-dot-recurse-when-trying-to-export-a-bundle-file-as-a-package

@bleater
Thanks a lot! I added links to this forum thread and the bug fix which caused regression, so hopefully that all will help to draw the full picture for the team who work on the fix.

1 Like

Is there any news to this? This is a major bug that appears to be underestimated by the unity developers. Exporting the unitypackage file is the last step in the release process of asset store developers. Unity will filter out the ios and mac native plugins without a warning causing us to upload broken builds to the asset store.

Edit: I just tested it. The unity asset store tools themselves do export correctly so only manual exports are hit by the bug

We have landed a fix that allows plugin folders to be exported in 2023.3.0b4. The back ports to 2022.3 and 2021.3 are in progress too.

1 Like