MAC-Asset Bundles can no longer be build on a Windows Machine

Before Unity 6, i could build asset bundle on a windows machine both for windows and osx with

BuildPipeline.BuildAssetBundles ("Assets/AssetBundles/win", BuildAssetBundleOptions.None, BuildTarget.StandaloneWindows64);
BuildPipeline.BuildAssetBundles ("Assets/AssetBundles/mac", BuildAssetBundleOptions.None, BuildTarget.StandaloneOSX);

This no longer works for me. I can build the asset bundles for windows without problems, but when i try to build for mac, the following error occurs:

Library\PackageCache\com.unity.collections\Unity.Collections\NativeList.cs(846,24): error CS7036: There is no argument given that corresponds to the required formal parameter 'safety' of 'NativeArray<T>.ReadOnly.ReadOnly(void*, int, ref AtomicSafetyHandle)'

Error building Player because scripts had compiler errors

Is it because windows/mac are now different build targets? Before Unity 6 the build target was only changed when switched to iOS or WebGL, but win/osx did not need a switch.

When i try to build the asset bundles from the same project on a mac, it works without problems. But there i can choose the mac build support (il2cpp), on windows i can only choose mac build support (mono). Is that a new thing?

I really don’t want to switch all the time between windows computers and the mac. The mac is just to compile the build for macos when a new version of my app is out.

We’ve had a quick chat within the engineering team, and from the error we wonder if that’s related to DOTS/Collections more than the AssetBundles API. To the best of our knowledge, there shouldn’t be any changes for AssetBundles in 6.0 that have that kind of knock-on effect.

That being said, if you’re able to file a bug / repo we can definitely make sure someone looks into it.

1 Like