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
Comments (11)
-
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
- Frame Debugger's Hierarchy is not navigable when connecting it to the project built with the Volumetric Fog
- The number of SetPass Calls is increasing when attaching the Frame Debugger to the Player
- Scrollbar briefly appears in the Package Manager during installation process even when the package list is too short to require scrolling
- Script resets to use the previous Skybox color when saving the Scene changes
- [2D] Sprite Library Editor window throws NullReferenceException error when entering Play Mode with Game View maximised
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