Example #1
0
 public void WriteToBuffers(BetterList <Vector3> v, BetterList <Vector2> u, BetterList <Color32> c, BetterList <Vector3> n, BetterList <Vector4> t)
 {
     if (mRtpVerts != null && mRtpVerts.size > 0)
     {
         if (n == null)
         {
             v.AddRanged(mRtpVerts.buffer, 0, mRtpVerts.size);
             u.AddRanged(uvs.buffer, 0, mRtpVerts.size);
             c.AddRanged(cols.buffer, 0, mRtpVerts.size);
         }
         else
         {
             v.AddRanged(mRtpVerts.buffer, 0, mRtpVerts.size);
             u.AddRanged(uvs.buffer, 0, mRtpVerts.size);
             c.AddRanged(cols.buffer, 0, mRtpVerts.size);
             n.Reserve(mRtpVerts.size);
             t.Reserve(mRtpVerts.size);
             for (Int32 i = 0; i < mRtpVerts.size; i++)
             {
                 n.Add(mRtpNormal);
                 t.Add(mRtpTan);
             }
         }
     }
 }