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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Add comment