Beispiel #1
0
/// <summary>
/// Applys the changes to flagged properties of the mesh. This method is slow, and should only be called once per frame. The speed is directly proportional to the number of flags that are true. Only apply necessary properties.
/// </summary>
    public abstract void Apply(bool triangles,
                               bool vertices,
                               bool normals,
                               bool tangents,
                               bool uvs,
                               bool colors,
                               bool uv1,
                               bool uv2,
                               bool bones = false,
                               MB2_MeshCombiner.GenerateUV2Delegate uv2GenerationFunction = null);
Beispiel #2
0
/*
 *      bool getIsGameObjectActive(GameObject g){
 #if UNITY_3_5
 *              return g.active;
 #else
 *              return g.activeInHierarchy;
 #endif
 *      }
 */
        public void Apply(MB2_MeshCombiner.GenerateUV2Delegate uv2GenerationMethod = null)
        {
            for (int i = 0; i < meshCombiners.Count; i++)
            {
                if (meshCombiners[i].isDirty)
                {
                    meshCombiners[i].combinedMesh.Apply(uv2GenerationMethod);
                    meshCombiners[i].isDirty = false;
                }
            }
        }
Beispiel #3
0
 public override void Apply(bool triangles,
                            bool vertices,
                            bool normals,
                            bool tangents,
                            bool uvs,
                            bool colors,
                            bool uv1,
                            bool uv2,
                            bool bones = false,
                            MB2_MeshCombiner.GenerateUV2Delegate uv2GenerationMethod = null)
 {
     _update_MB2_MeshCombiner();
     meshCombiner.Apply(triangles, vertices, normals, tangents, uvs, colors, uv1, uv2, bones);
 }
Beispiel #4
0
 public void Apply(bool triangles,
                   bool vertices,
                   bool normals,
                   bool tangents,
                   bool uvs,
                   bool colors,
                   bool uv1,
                   bool uv2,
                   bool bones = false,
                   MB2_MeshCombiner.GenerateUV2Delegate uv2GenerationMethod = null)
 {
     for (int i = 0; i < meshCombiners.Count; i++)
     {
         if (meshCombiners[i].isDirty)
         {
             meshCombiners[i].combinedMesh.Apply(triangles, vertices, normals, tangents, uvs, colors, uv1, uv2, bones, uv2GenerationMethod);
             meshCombiners[i].isDirty = false;
         }
     }
 }
Beispiel #5
0
 public override void Apply(MB2_MeshCombiner.GenerateUV2Delegate uv2GenerationMethod = null)
 {
     _update_MB2_MeshCombiner();
     meshCombiner.Apply(uv2GenerationMethod);
 }
Beispiel #6
0
/// <summary>
/// Apply changes to the mesh. All channels set in this instance will be set in the combined mesh.
/// </summary>
    public abstract void Apply(MB2_MeshCombiner.GenerateUV2Delegate uv2GenerationFunction = null);