Search Unity

Texture UV issue in game build

Discussion in 'Editor & General Support' started by ScrappyRMH, Mar 23, 2014.

  1. ScrappyRMH

    ScrappyRMH

    Joined:
    Apr 11, 2011
    Posts:
    48
    I'm having an issue with UVs in the final game build. In the editor, as you can see on the left, the grate texture looks fine. But when I build the game, the grate texture gets mangled on any shape that isn't a square. The mesh has been triangluated on the top faces as shown in the shots from Maya. I don't have mesh compression checked in the import for this mesh. Has anyone run into this issue?

    $UVGrate.jpg
     
  2. MODev

    MODev

    Joined:
    Jul 30, 2013
    Posts:
    229
    Maybe you have exported by mistake some kind of animationa and you havent removed it in Model Import settings?
    Or maybe you are using some strange shader? It can works than differently in editor and in build.
    Also I think you can use some shader for UVs debug to see if UVs is changing in way editor->build
     
  3. ScrappyRMH

    ScrappyRMH

    Joined:
    Apr 11, 2011
    Posts:
    48
    There are no animations on the meshes and the animation import is set to None. The shader is one of the Unity default shaders Transparent/Bumped Specular. I've also tried it with just Diffuse and get the same distortion.
     
  4. ScrappyRMH

    ScrappyRMH

    Joined:
    Apr 11, 2011
    Posts:
    48
    I found the problem. If the UVs are mapped to too small of an area, there will be some data rounding errors that cause the warping. I'm not really sure why this happens only in the game build and not in the development mode. By scaling up the UV's, the problem went away.
     
  5. windwolfx_23

    windwolfx_23

    Joined:
    Jan 15, 2015
    Posts:
    11
    if anyone still interested, the problem is player setting -> optimizaion section -> vertex compression and optimize mesh data, these optimization cloud resulting accuracy lost
     
    Farstone likes this.