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
- [Mobile] Developer Console does not appear when an error is thrown
- [HDRP] Game view renders artifacts when Camera's Component "Post Anti-aliasing" is set to "TAA" and Dynamic Resolution's "Forced Screen Percentage" is changed
- A deactivated Prefab's name color becomes white when a GameObject in the scene is deactivated
- The Game view becomes blank when using Frame Debugger with MSAA and Texture binding enabled in Play Mode
- NullReferenceException is thrown when changing the Inspector preview selection
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