Пример #1
0
        public bool _OkToCreateDummyTextureBakeResult(MB3_MeshBakerCommon mom)
        {
            List <GameObject> objsToMesh = mom.GetObjectsToCombine();

            if (objsToMesh.Count == 0)
            {
                return(false);
            }
            if (objsToMesh [0] == null)
            {
                return(false);
            }
            Material[] ms = MB_Utility.GetGOMaterials(objsToMesh[0]);
            for (int i = 1; i < objsToMesh.Count; i++)
            {
                Material[] ms2 = MB_Utility.GetGOMaterials(objsToMesh[i]);
                if (!MB_Utility.ArrayBIsSubsetOfA(ms, ms2))
                {
                    Debug.LogError("Materials on " + objsToMesh[i] + " in the list of objects to combine were not a subset of the materials on the first object in the list.");
                    return(false);
                }
            }
            return(true);
        }