Terrain missing on build

Hey folks,
When I make an android build, the terrain object in a prefab in not showing. I’ve added a check in code to make sure the object is there and it is being found, it’s just not displaying the texture. I’ve tried adding the texture and any related prefabs to the resources folder, but even so other prefabs like trees and buildings situated in the same folder are still showing. I’ve also tried playing around with the texture settings, such as changing the material setting to the legacy versions but nothing has worked so far.
Any help would be much appreciated!

Hello,

I think I have similar problem going on, if I understood you correctly. I have tried to tweek some properties, but nothing seems to do any difference. So in the build the terrain isn’t visible. Any ideas?

Here’s a screenshot from mobile, where the terrain isn’t visible. It’s there however, because I can drive on the terrain, but I just cannot see it.

Here’s a screenshot from the same location in editor, where the terrain is visible.

Seems like we have the same issue then. I haven’t managed to fix it yet, spent hours trying different things. Have you fixed it yet?

No, unfortunately I haven’t. I have spent two days now with this issue without any tangible results. I’m not sure if this is a terrain issue or a camera issue, because in other terrain I’m able to see it, but it’s rendered incorrectly. While I drive around sometimes it’s rendered and sometimes it just totally invisible. However all the other object are rendered.

4849142--466505--upload_2019-8-12_21-30-29.png

Let me know if you come up with something.

Hello,
i had the same problem,
it turned out to be an unsupported shader on android
turning off " draw instanced" on the terrain solved it
found it here:

4 Likes

Just ran into this problem and yup, had to turn off “Draw Instanced”, which solved it.

Ditto for a WebGL deployment in Unity 2019.4.11.

Terrain textures are not rendered when “Draw Instanced” is enabled. The geometry is all there though.
It works fine when “Draw Instanced” is disabled.

1 Like

I recently ran into a similar issue on Unity 2021+.

I ended up creating a custom material (Using HDRP/TerrainLit as the base) and then enabling Instancing on the material and then create the terrain and set the materialTemplate as below.

terrainObject.GetComponent().materialTemplate = Resources.Load(“Material/HDRPLitGround”);

Thank you so much! I was going crazy trying to figure out what was causing this.