public GameObject textObject;
// Componets Object
public void EnableProperty(){
textObject.GetComponent<TextMeshProUGUI>().fontSharedMaterial.EnableKeyword(ShaderUtilities.Keyword_Glow);
// Glow Property
textObject.GetComponent<TextMeshProUGUI>().fontSharedMaterial.EnableKeyword(ShaderUtilities.Keyword_MASK_HARD);
textObject.GetComponent<TextMeshProUGUI>().fontSharedMaterial.EnableKeyword(ShaderUtilities.Keyword_MASK_SOFT);
textObject.GetComponent<TextMeshProUGUI>().fontSharedMaterial.EnableKeyword(ShaderUtilities.Keyword_Bevel);
textObject.GetComponent<TextMeshProUGUI>().fontSharedMaterial.EnableKeyword(ShaderUtilities.Keyword_MASK_TEX);
textObject.GetComponent<TextMeshProUGUI>().fontSharedMaterial.EnableKeyword(ShaderUtilities.Keyword_Ratios);
textObject.GetComponent<TextMeshProUGUI>().fontSharedMaterial.EnableKeyword(ShaderUtilities.Keyword_Underlay);
// UnderLay Property
}
public void DisabledProperty(){
textObject.GetComponent<TextMeshProUGUI>().fontSharedMaterial.DisableKeyword(ShaderUtilities.Keyword_Glow);
// Glow Property
textObject.GetComponent<TextMeshProUGUI>().fontSharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_HARD);
textObject.GetComponent<TextMeshProUGUI>().fontSharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_SOFT);
textObject.GetComponent<TextMeshProUGUI>().fontSharedMaterial.DisableKeyword(ShaderUtilities.Keyword_Bevel);
textObject.GetComponent<TextMeshProUGUI>().fontSharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_TEX);
textObject.GetComponent<TextMeshProUGUI>().fontSharedMaterial.DisableKeyword(ShaderUtilities.Keyword_Ratios);
textObject.GetComponent<TextMeshProUGUI>().fontSharedMaterial.DisableKeyword(ShaderUtilities.Keyword_Underlay);
// UnderLay Property
}
TextMeshProUGUI에서 폰트 메터리얼의 KeyWord를 컨트롤 해주면 된다.
[Solution] Unity Sdk For Firebase Dowload (0) | 2020.05.23 |
---|---|
[solution] Copying assembly from 'Temp/com.unity.multiplayer-hlapi.Runtime.dll' to (0) | 2020.05.19 |
[solution] Unity Xcode Build Warnning ITMS-90109 (0) | 2020.05.18 |
Unity Datetime Basic (0) | 2020.04.14 |
java.lang.ClassNotFoundException: Didn't find class "androidx.multidex.MultiDexApplication (0) | 2020.04.07 |
nullreferenceexception for Preview window UnityEditor.PreviewWindow.OnDisable () (0) | 2020.01.21 |