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
- The Scene View becomes gray and "NullReferenceException" errors are thrown when attaching the Unity Editor process to RenderDoc
- Memory usage rapidly rises when changing colors in the color wheel
- Physically Based Sky's Horizon and Zenith Tint Color Selection Bars don't have immediate access to color pickers
- EmptyAdditionalLightShadowmapTexture leaks from memory when URP quality level is changed using QualitySettings.SetQualityLevel
- Referenced ScriptableObject field does not get updated and cannot be set to "None" when there are no Objects of that type
Add comment