Search Issue Tracker
Won't Fix
Votes
0
Found in
2019.2
2019.3.0b7
2020.1
Issue ID
1192628
Regression
No
[iOS][Metal] Freeze when generating 40 000 objects in runtime
How to reproduce:
1. Build the attached project for iOS
2. Build & Run the app to device via Xcode
3. Wait
Actual result: Unity freezes.
Reproducible with: 2020.1.0a11, 2019.3.0b9, 2019.2.11f1.
Devices reproducible with:
- iPhone XR (iOS 12.0)
- iPhone 8 Plus (iOS 12.0)
- iPhone 7 (iOS 12.3.1)
Devices not reproducible with:
- iPhone X (iOS 13.0) (The app doesn't freeze, but runs on 0-2 FPS)
- VLNQA00257, Sony Xperia XZ Premium (G8141), Android 9, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540
Notes:
- Can't test 2018.4 because the project breaks on that version.
- Mac Editor crashes on ioAccelResourceListAddNewGroupAndResource (case 1191807).
- The issue is not reproducible with OpenGL.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Resolution Note (2020.1.X):
User was calling MeshFilter.mesh for every object which in turn created 40 000 unique meshes and 80 000 new buffers. This amount is currently unsustainable on iOS devices.
A better approach to render this amount of objects is to use DrawMeshInstanced, any per instance data can be set using MaterialPropertyBlocks.
https://docs.unity3d.com/ScriptReference/Graphics.DrawMeshInstanced.html
https://docs.unity3d.com/Manual/GPUInstancing.html