Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Bug Terrain Visibility Issue in Build Mode vs. Editor Mode - MapMagic2

Discussion in 'Editor & General Support' started by RafaelGaju, May 2, 2024.

  1. RafaelGaju

    RafaelGaju

    Joined:
    Apr 8, 2020
    Posts:
    6
    Hello everyone,

    I'm currently developing a game using Unity and I've run into a puzzling issue that I hope someone can help me with. In the Unity Editor, the terrain in my game displays correctly and everything looks as expected. However, when I build the game and run the executable, the terrain is completely invisible, although other elements are visible just fine.

    Here are some specifics about my setup:

    • Unity Version: 2023.2.4f1
    • Rendering Pipeline: URP
    • Platform: Windows

    Screenshots in Editor and Build mode are attached for reference. Screenshot 2024-05-02 154323.png
    Screenshot 2024-05-02 154216.png
    Has anyone encountered a similar issue or does anyone have any idea what might be causing this? Any help or suggestions on what to check or try next would be greatly appreciated!

    Thanks in advance
     

    Attached Files:

  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    6,923
    I've seen that before but can't remember what it was. I think it was a terrain material shader that was made for BiRP and didn't work in URP despite conversion. Try using a standard URP terrain shader / material perhaps.

    You're missing out on 15 patch (bugfix) releases. Slight chance you may have a better experience with 2023.2.20f1 in case this is/was an actual engine bug (unlikely but still good practice to be on the latest patch).
     
  3. RafaelGaju

    RafaelGaju

    Joined:
    Apr 8, 2020
    Posts:
    6
    I upgraded to 2023.2.20f1 and verified the terrain material uses URP Terrain Lit but the issue still persists
     
  4. RafaelGaju

    RafaelGaju

    Joined:
    Apr 8, 2020
    Posts:
    6
    Tracked this to an asset named MapMagic2, it seems if the scene is generated from scratch, meaning at least not a single main or draft tile pregenerated and saved with the scene before the build, the terrain would still generate but it would be invisible.

    I wasn't thinking this asset was the issue because I also tested it with a standalone terrain, but it somehow got affected by this asset.