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

Question No Detail Mesh When Buiding Project

Discussion in 'General Graphics' started by NoPanDa, Apr 19, 2022.

  1. NoPanDa

    NoPanDa

    Joined:
    Jan 18, 2020
    Posts:
    10
    I made a custom shader for my grass and used the Detail Mesh function on the terrain to place it. It looks great in the editor but when I build the project it is gone.

    I have tried turning off all shader stripping and even added a few nromal meshes using the same material in the scene (they show up fine), just to check if the shader didn't get compiled or something like that. Nothing is working.

    I have lastly tried turning off GPU Instancing on the Detail Mesh settings, and while it then looks bad it does show up when building the project. This again tells me that the material probably wasn't compiled, got stripped or something, but as other objects using the same material shows up and as I turned off all stripping of shaders, it must be something else?

    I really really need help with this. Thank you.

    (I have also tried building for my phone and for my PC, same problem on both platforms) NoDetailMeshOnBuild.jpg
     
  2. NoPanDa

    NoPanDa

    Joined:
    Jan 18, 2020
    Posts:
    10
    Here is the shader, if that can be any clue (it's just draft but I see not reason for why it wouldn't work)
    NoDetailMeshOnBuild_Shader.jpg