Search Unity

Help! Tiling on generated mesh

Discussion in 'Scripting' started by Carrion-Crow, Nov 23, 2016.

  1. Carrion-Crow

    Carrion-Crow

    Joined:
    Apr 3, 2015
    Posts:
    15
    Hi, I need help!

    My mesh generated to point click on terrain for quad follow to next point click

    My code generated UV on mesh

    uvs=newVector2[newMesh.vertices.Length];
    for(inti=0;i<uvs.Length;i++)
    {
    if(i%2==0)
    {
    uvs=newVector2(0f,(newMesh.vertices.x+newMesh.vertices.z)/2*(UV*0.1f));
    }
    else
    {
    uvs=newVector2(1f,(newMesh.vertices.x+newMesh.vertices.z)/2*(UV*0.1f));
    }
    }

    problem see to screenshot
     

    Attached Files:

  2. LeftyRighty

    LeftyRighty

    Joined:
    Nov 2, 2012
    Posts:
    5,148
  3. Carrion-Crow

    Carrion-Crow

    Joined:
    Apr 3, 2015
    Posts:
    15