Exemplo n.º 1
0
 public virtual IEnumerator ConvertTexturesToReadableFormats(ProgressUpdateDelegate progressInfo,
                                                             CombineTexturesIntoAtlasesCoroutineResult result,
                                                             TexturePipelineData data,
                                                             TextureCombineHandler combiner,
                                                             EditorMethodsInterface textureEditorMethods)
 {
     Debug.Assert(!data.IsOnlyOneTextureInAtlasReuseTextures());
     //MakeProceduralTexturesReadable(progressInfo, result, data, combiner, textureEditorMethods, LOG_LEVEL);
     for (int i = 0; i < data.distinctMaterialTextures.Count; i++)
     {
         for (int j = 0; j < data.texPropertyNames.Count; j++)
         {
             MaterialPropTexture ts = data.distinctMaterialTextures[i].ts[j];
             if (!ts.isNull)
             {
                 if (textureEditorMethods != null)
                 {
                     Texture tx = ts.GetTexture2D();
                     if (progressInfo != null)
                     {
                         progressInfo(String.Format("Convert texture {0} to readable format ", tx), .5f);
                     }
                     textureEditorMethods.AddTextureFormat((Texture2D)tx, data.texPropertyNames[j].isNormalMap);
                 }
             }
         }
     }
     yield break;
 }
 public virtual void ConvertTexturesToReadableFormats(
     TextureCombinePipelineData data,
     EditorMethodsInterface textureEditorMethods)
 {
     for (int i = 0; i < data.distinctMaterialTextures.Count; i++)
     {
         for (int j = 0; j < data.texPropertyNames.Count; j++)
         {
             MaterialPropTexture ts = data.distinctMaterialTextures[i].ts[j];
             if (!ts.isNull)
             {
                 if (textureEditorMethods != null)
                 {
                     Texture tx = ts.GetTexture2D();
                     textureEditorMethods.AddTextureFormat(
                         (Texture2D)tx, data.texPropertyNames[j].isNormalMap);
                 }
             }
         }
     }
 }