I couldn’t find much info on this when searching, but this Unity Answers thread seems to be identical to the issue I’m having.
Basically, in my game I have a prefab that when spawned a certain amount of times, the app crashes.
Here’s the /Assets folder for my test project. The error occurs when the material has my shader applied, you have dynamic batching enabled, and you tap the button to spawn many prefabs.
If you use the ‘FeX/Unlit’ shader, then you can spawn 127 instances before it crashes.
If you use the ‘FeX/UnlitWithNormal’ shader, then you can spawn 63 instances before it crashes.
If you use the ‘FeX/UnlitWithNormalAndTangent’ shader then it doesn’t crash? I went past 200 without issues.
The 2nd shader has twice the input vertex format size compared to the first, and the crash occurs twice as fast, so I presume the issue has to do with copying data into the vertex buffer. Though I’m not sure why the 3rd shader works fine.
The stack trace is:
0 TransformVertices_Strided_XYZN_0_Loop
1 TransformStrided [inlined]
2 TransformSubmeshToWorldSpace(blah blah)
I’m running Unity 3.4.2f3, under OpenGL ES 2.0
Has anyone else experienced this issue?