Hi,
I have a scene that I build in an asset bundle, (I then use a loader to instantiate the scene)
This scene has a terrain and some detail Mesh on it. When I play the scene without using asset bundle all look good but when I Load it from the asset bundle I have very strange bugs on detail mesh, they doesn’t appear correctly with the distance, the mesh look like some triangle are missing, and when we move the triangle appear one by one … Not the whole detail mesh like it should…
Any Idea ?
Maybe a hint : In the editor, If I use the command “Refresh tree and detail prototype” when in Play mode this bug disappear.
But how to call this function in script. I try Terrain.Flush but it doesn’t do the same things and so doesn’t work
Help Please
I find a solution but d’ont really understand why I have to do this :
I just launch this at the end of the loading (which make a “Refresh tree and detail prototype” ) and it works :
Terrain terrain = (Terrain)(Object.FindObjectOfType(typeof(Terrain)));
terrain.terrainData.RefreshPrototypes();