public void ReloadThemes() { if (Application.isEditor && !Application.isPlaying) { ImageManager.ClearCache(); AudioManager.ClearCache(); } string lastThemeName = CurrentTheme?.Name; themeNameToTheme = new Dictionary <string, Theme>(); string themesFilePath = ApplicationUtils.GetStreamingAssetsPath(ThemesFolderName + "/" + ThemesFileName); string themesFileContent = File.ReadAllText(themesFilePath); ReloadThemesFromXml(themesFileContent); // Restore last selected theme if (!lastThemeName.IsNullOrEmpty()) { Theme theme = GetTheme(lastThemeName); if (theme != null) { CurrentTheme = theme; } } }
private static string GetPropertiesFilePath(string propertiesFileNameWithCountryCode) { string path = I18NFolder + "/" + propertiesFileNameWithCountryCode + PropertiesFileExtension; path = ApplicationUtils.GetStreamingAssetsPath(path); return(path); }
private string GetStreamingAssetsPath(string resourceName) { string resourcePath = ThemeManager.ThemesFolderName + "/" + Name + "/" + resourceName; return(ApplicationUtils.GetStreamingAssetsPath(resourcePath)); }
private static string GetInputActionAssetFilePath() { return(ApplicationUtils.GetStreamingAssetsPath("Input/UltraStarPlayInputActions.inputactions")); }