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
- UI Overlay Image gets darker on each Camera when multiple Cameras are used
- Assertion failed on expression: 'scriptedImporterClass == SCRIPTING_NULL error when opening the standalone profiler window
- Disabled assets in Import Unity Package window aren't tracked but count as being selected by user
- [Windows] Crash on GetManagerFromContext when video is playing and creating High Definition 3D Projects after FMOD failed to switch back to normal output Error appeared
- GC Alloc produced when adding items to MultiColumnListView with Auto Assign Binding
Add comment