Esempio n. 1
0
 internal static void fillEmptyTextureSlot(Material mat, string slot, string textureColor)
 {
     if (mat.HasProperty(slot) && mat.GetTexture(slot) == null)
     {
         Log.replacement("Replacing empty textureslot: " + slot + " with color: " + textureColor);
         mat.SetTexture(slot, TexturesUnlimitedLoader.getTextureColor(textureColor));
     }
 }
 protected override void applyInternal(Material mat)
 {
     if (checkApply(mat))
     {
         Texture2D texture = TexturesUnlimitedLoader.getTextureColor(colorString);
         if (texture == null)
         {
             Log.error("ERROR: KSPShaderLoader - TextureColor could not be created for string: " + colorString + " for texture slot: " + name + " while loading textures for material: " + mat);
         }
         mat.SetTexture(name, texture);
     }
 }