public void ChangeFontType(FontsManager.FontType type) { if (type != fontType) { fontType = type; UpdateFont(); } }
void Start() { if (FontsManager.Instance != null) { // Get font type fontType = FontsManager.Instance.GetFontType(textMesh != null && textMesh.font != null ? textMesh.font.name : string.Empty); // Get font FontsManager.Instance.onFontsUpdated += UpdateFont; UpdateFont(); } }
void Awake() { // Get font type if (textProObject != null) { fontType = FontsManager.Instance.GetFontType(textProObject.font.name); } else if (textUI != null) { fontType = FontsManager.Instance.GetFontType(textUI.font.name); } // Get font FontsManager.Instance.onFontsUpdated += UpdateFont; UpdateFont(); }