public TextureCombinerNonTextureProperties(bool considerNonTextureProps) { _considerNonTextureProperties = considerNonTextureProps; textureProperty2DefaultColorMap = new Dictionary <string, Color>(); for (int i = 0; i < defaultTextureProperty2DefaultColorMap.Length; i++) { textureProperty2DefaultColorMap.Add(defaultTextureProperty2DefaultColorMap[i].name, defaultTextureProperty2DefaultColorMap[i].color); _nonTexturePropertiesBlender = new NonTexturePropertiesDontBlendProps(this); } }
private void FindBestTextureBlender(Material resultMaterial) { Debug.Assert(_considerNonTextureProperties); resultMaterialTextureBlender = FindMatchingTextureBlender(resultMaterial.shader.name); if (resultMaterialTextureBlender != null) { Debug.Log("Using _considerNonTextureProperties found a TextureBlender for result material. Using: " + resultMaterialTextureBlender); } else { Debug.LogWarning("Using _considerNonTextureProperties could not find a TextureBlender that matches the shader on the result material. Using the Fallback Texture Blender."); resultMaterialTextureBlender = new TextureBlenderFallback(); } _nonTexturePropertiesBlender = new NonTexturePropertiesBlendProps(this, resultMaterialTextureBlender); }