Search Issue Tracker
Won't Fix
Votes
0
Found in
5.5.1f1
Issue ID
888937
Regression
No
[IL2CPP][iOS] Asset Bundle loading assemblies are stripped if there are no MonoBehaviours in the project
If there are no MonoBehaviours (C# scripts deriving from MonoBehaviour) in the Project, Asset Bundles cannot be loaded on iOS.
Steps to reproduce:
1) Open the attached project.
2) Delete /Assets/Scripts folder.
3) Switch platform to iOS.
4) Go to ASSETBUNDLES > Build Asset Bundles.
5) Build the project for iOS.
6) Run on a device.
Error is logged in Xcode's console:
Unable to load asset bundle: /var/containers/Bundle/Application/39871C90-61A0-4512-9F05-431E44BD02AB/assetbundles.app/Data/Raw/testbundle
This indicates that Asset Bundle can't be loaded.
The project uses a managed DLL instead of a regular script to load the bundles. Apparently, Asset Bundle assemblies are stripped when there are no MonoBehaviour scripts in the project. Scripts that don't derive from MonoBehaviour don't prevent the bug from happening.
This doesn't occur when Engine Code Stripping is disabled, or when Mono2x Scripting API is used. Does not reproduce on Android.
Note: the DLLs are not stripped since they are used to log the aforementioned error message.
Reproduced on:
2017.1.0a3, 5.5.1f1, 5.4.5f1, 5.3.7p4
Devices tested:
iPhone 7 iOS 10.3
LG Nexus 5 Android 6.0.1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Audio Mixer “+” buttons overlap with UI when the Audio Mixer window layout is set to Horizontal
- "Clear" button in the "Set project display name" closes all the pop-up instead of clearing just a name from the field
- Video Player renders no video on specific devices when using Vulkan
- The Editor slows itself down by showing tons of warnings when the majority of TransformAccessArrays content are NullRefs
- Mixers do not have "Rename" in the right-click context menu when a Mixer is right-clicked in the Audio Mixer window
Add comment