Esempio n. 1
0
    static bool validateSubmeshOverlap(SA3MeshCombineRoot mom)
    {
        List <GameObject> objsToMesh = mom.GetObjectsToCombine();

        for (int i = 0; i < objsToMesh.Count; i++)
        {
            Mesh m = SAUtility.GetMesh(objsToMesh[i]);
            if (SAUtility.doSubmeshesShareVertsOrTris(m) != 0)
            {
                Debug.LogWarning("Object " + objsToMesh[i] + " in the list of objects to combine has overlapping submeshes (submeshes share vertices). If the UVs associated with the shared vertices are important then this bake may not work. If you are using multiple materials then this object can only be combined with objects that use the exact same set of textures (each atlas contains one texture). There may be other undesirable side affects as well. Mesh Master, available in the asset store can fix overlapping submeshes.");
                return(true);
            }
        }
        return(true);
    }