From c71ff3eff07b0efa363856353664c76cd845b9f3 Mon Sep 17 00:00:00 2001 From: Dylan Imrei Date: Sun, 29 Oct 2023 20:40:36 +1100 Subject: [PATCH] Fixed issue where BaseMaterialEffect failed to set Shader Keywords with some cultures (E.g. Turkish) The root cause of this problem in the Turkish culture is the distinct nature of the 'i' character in Turkish, which differs from the 'i' character in other cultures. This variance disrupts the correct setting of Shader Keywords. --- Scripts/Common/BaseMaterialEffect.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Common/BaseMaterialEffect.cs b/Scripts/Common/BaseMaterialEffect.cs index 0cf2d7a..331fde1 100644 --- a/Scripts/Common/BaseMaterialEffect.cs +++ b/Scripts/Common/BaseMaterialEffect.cs @@ -88,7 +88,7 @@ protected void SetShaderVariants(Material newMaterial, params object[] variants) { // Set shader keywords as variants var keywords = variants.Where(x => 0 < (int) x) - .Select(x => x.ToString().ToUpper()) + .Select(x => x.ToString().ToUpperInvariant()) .Concat(newMaterial.shaderKeywords) .Distinct() .ToArray();