/// <summary> /// Sets the shader and properties to the input material /// </summary> /// <param name="material"></param> public void apply(Material material) { material.shader = TexturesUnlimitedLoader.getShader(shader); TextureSet.updateMaterialProperties(material, shaderProperties); TextureSet.fillEmptyStockTextureSlots(material); material.renderQueue = TexturesUnlimitedLoader.isTransparentMaterial(material) ? TexturesUnlimitedLoader.transparentTextureRenderQueue : TexturesUnlimitedLoader.diffuseTextureRenderQueue; }
/// <summary> /// Sets the shader and properties to the input material /// </summary> /// <param name="material"></param> public void apply(Material material, bool isIcon = false) { if (isIcon) { material.shader = TexturesUnlimitedLoader.iconShaders[shader].iconShader; } else { material.shader = TexturesUnlimitedLoader.getShader(shader); } TextureSet.updateMaterialProperties(material, shaderProperties); TextureSet.fillEmptyStockTextureSlots(material); material.renderQueue = renderQueue; material.mainTextureOffset = textureOffset; material.mainTextureScale = textureScale; Log.replacement("Updated material properties\n" + Debug.getMaterialPropertiesDebug(material)); }