void LateUpdate()
 {
     //Apply changes after this and other scripts have made changes
     //Only to vertecies, tangents and normals
     //Only want to call this once per frame since it is slow
     meshbaker.UpdateGameObjects(objsToMove, false);
     Vector2[] uvs2 = m.uv;
     for (int i = 0; i < uvs2.Length; i++)
     {
         uvs2[i] = Mathf.Sin(Time.time) * uvs[i];
     }
     m.uv = uvs2;
     meshbaker.UpdateGameObjects(new GameObject[] { objWithChangingUVs }, true, true, true, true, true, false, false, false, false);
     meshbaker.Apply(false, true, true, true, true, false, false, false);
 }
Пример #2
0
 void LateUpdate()
 {
     //Apply changes after this and other scripts have made changes
     //Only to vertecies, tangents and normals
     //Only want to call this once per frame since it is slow
     meshbaker.UpdateGameObjects(objsToCombine);
     meshbaker.Apply(false, true, true, true, false, false, false, false);
 }