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
- Inspector's custom tooltip is displayed incorrectly when the name is truncated in UI toolkit
- Crash on ScriptableRenderLoopDraw when rendering a specific VFX in Play Mode
- The script is not renamed in the Project window when renaming and a compilation Error is present
- Average FPS in Play Mode degradation on a newly created BiRP project when it's upgraded from 2020.3.48f1 to a newer Editor version
- DecoratorDrawer indentation is incorrect when it is called with EditorGUI
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