Search Issue Tracker
Won't Fix
Votes
13
Found in
2018.1.0f2
Issue ID
1038686
Regression
No
Graphics.DrawMeshInstanced doesn't draw anything in build
To reproduce:
1. Open the project, attached by the user (TestInstancing.zip)
2. Open the "SampleScene" scene
3. Enter Play mode
4. Observe that 3 red cubes are drawn
5. Build and run the project for PC standalone
6. Observe that in the build nothing is drawn
Expected: the cubes are drawn in the build as well
Reproduced in 2017.3.2f1, 2017.4.3f1, 2018.1.0f2, 2018.2.0b4, 2018.3.0a1
Reproduced on Windows, Mac and WebGL
-
Dennin-Dalke
Aug 17, 2018 01:13
Hey I'm having the same issue, any news on that? On Editor the DrawMeshInstanced is working normally, but on a PC build it never shows up. I'm using Unity 2018.1.8f1
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
- "Unsupported texture format R16 for a swizzle" error and texture is not correctly rendered when using texture Swizzle and reimporting texture asset
- Tab order is incorrect after re-ordering
- [Ubuntu] Red squares instead of ticks in dropdown options
- Multiple simultaneous input with the touch screen sometimes leaves button in not default state
- Crash on ShowDelayedContextMenu(bool) when changing the Size options of a Visual Element in the UIToolkit Inspector
Resolution Note (2018.3.X):
This happens because shader have instancing support but the material they use (with enabled instancing) is created at runtime, so the "instancing variants" are stripped on build. As a workaround it is enough to create material with this shader and instancing enabled and assign it to some public variable in script.
But there might be better workarounds