public void SetFontAndMaterial(LocalizedLanguage language, int outlineIndex, ref RTLTextMeshPro RTLTextMeshPro)
        {
            FontAssetDetails fontAssetDetails = LocalizationManager.Instance.GetFontAssetDetailsByLanguage(language);

            RTLTextMeshPro.font = fontAssetDetails.FontAsset;
            RTLTextMeshPro.fontSharedMaterial = fontAssetDetails.MaterialPresets[outlineIndex];
        }
Example #2
0
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            EditorGUI.BeginProperty(position, label, property);

            FontAssetDetails fontAssetDetails = fieldInfo.GetValue(property.serializedObject.targetObject) as FontAssetDetails;

            var fontAsset = property.FindPropertyRelative("FontAsset");

            EditorGUI.indentLevel += 1;
            EditorGUILayout.PropertyField(fontAsset, new GUIContent("Font Asset"), true);
            EditorGUI.indentLevel -= 1;

            var materialPresets = property.FindPropertyRelative("MaterialPresets");

            ShowArrayProperty(materialPresets);

            EditorGUI.EndProperty();
        }