Search Unity

2019.1: Procedurally generated terrains are missing details in Player (works in 2018.3)

Discussion in 'World Building' started by isaac-ashdown, Apr 24, 2019.

  1. isaac-ashdown


    Jan 30, 2019
    We create terrains procedurally at runtime in our game. After upgrading to 2019.1, the procedurally placed detail billboards no longer display in the Player, though they work correctly in the Editor.


    1. Open the attached project and the isaac_tree_test scene
    2. Press Play in the editor
    3. Notice that the game generates a field of trees, which are then removed over the first couple of seconds
    4. Build the project as a standalone Player
    5. Play the game - you will notice that the trees do not display at all.

    Note: if you comment out line 17 from CETestTrees, the bug no longer happens. However, we want to be able to create an arbitrary number of new Terrain componenents at runtime so this solution is not usable for us
    Note: if you instead use Terrain.CreateTerrainGameObject() to create the Terrain, the bug still occurs, although in this case with the additional effect of the terrain mesh itself displaying as purple in the Player (ie, as if it had a bad material).

    I've reported this to unity here but am posting on the Forums in case anyone else has also run into this solution and has found a workaround they could share.