IEnumerator LoadFontCoroutine() { yield return(new WaitForSecondsRealtime(5f)); if (File.Exists(Configuration.PluginConfig.Instance.font)) { try { Font font = FontManager.AddFontFile(Configuration.PluginConfig.Instance.font); TMP_FontAsset fontAsset = BeatSaberUI.CreateTMPFont(font); uiFont = BeatSaberUI.CreateFixedUIFontClone(fontAsset); if (uiFont != null) { uiFontEnabled = true; } } catch { Logger.log.Error($"Failed to load font: {Configuration.PluginConfig.Instance.font}"); } } }