Search Issue Tracker
By Design
Votes
3
Found in
2018.3.0a4
2018.3.6f1
2019.1.0a1
2019.2.0a1
Issue ID
1133159
Regression
No
Standalone builds do not include instanced Terrain shaders if the Terrains are created dynamically at runtime.
How to reproduce:
1. Open the user-submitted project ("terrainbug.zip")
2. Open the "SampleScene" and enter Play Mode
3. Observe the Instanced terrain is working properly
4. Build the Project and observe the lack of a drawn terrain
5. Press "I" on your keyboard to toggle "drawInstanced" renderer off and observe the difference
Expected result: the terrain is rendered correctly both in the Editor and Standalone Build without any issues
Actual result: the terrain isn't rendered at all in the Standalone build when "drawInstanced" is set to true
Reproduced in: 2019.2.0a7, 2019.1.0b5, 2018.3.7f1, 2018.3.0a4
Couldn't test with: 2018.3.0a3, 2017.4.22f1 (these versions don't accept "drawInstanced" as a valid argument)
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
- Erratic behavior while editing UI in prefab when Canvas "Render Mode" is set to "Screen Space - Camera" option
- The Selection Wire Gizmo is not being rendered in the Scene View when GPU Resident Drawer is enabled
- Visual Effect with Single Burst Spawn System stops playing when an Additive Scene is loaded asynchronously with SceneManager.LoadSceneAsync
- The sprite draw calls are batched in the Player when the Sprite Atlas is uploaded from an AssetBundle and the Sprite Atlas Mode is set to Disabled
- The Joint Anchor position remains the same when the GameObject is dynamically scaled
Resolution Note (2019.2.X):
Terrain shader is not included in the build if it's not used. Furthermore the instancing variant won't be included if instancing is not enabled on the terrain.
The right way to do runtime terrain creation is to include a Material referencing the terrain shader you want to use and enable instancing on it.