Search Unity

Mapping Unity units to distance in textures?

Discussion in 'Editor & General Support' started by FirstAndTen, Nov 27, 2017.

  1. FirstAndTen

    FirstAndTen

    Joined:
    Oct 16, 2017
    Posts:
    16
    Rephrasing this question in the hopes someone will respond to help me.

    I have a football field created in a 2048x2048 texture. Each 1x1yd square is 14pix in the texture.

    When I import the field mesh and field texture into Unity, 1 unit in Unity is not 1 yd on the field. How can I create the field so it will match when I import the mesh and texture into Unity? See screenshot, you can see the Unity grid (thin lines) does not match the grid from my texture.

    Thanks!
     
    Last edited: Nov 28, 2017
  2. FirstAndTen

    FirstAndTen

    Joined:
    Oct 16, 2017
    Posts:
    16
    I figured it out. Just in case anyone has this issue and comes across this thread, 14px per yard didn't come out even for the # of units the mesh's size was set at. I changed the texture to be 16px per yard, which 2048 / 16 = 128. I set the mesh to be 128 units in size and it now aligns perfectly with Unity's units.