Example #1
0
 static void fetchImage(Splash splash)
 {
     SplashApi.FetchSplashImage(CImageUtils.SplashImageUrl(splash.image)).Then(imageBytes => {
         File.WriteAllBytes(PATH + splash.image.GetHashCode(), imageBytes);
         var splashInfo = JsonConvert.SerializeObject(splash);
         PlayerPrefs.SetString(SplashInfoKey, splashInfo);
     });
 }
        static void fetchImage(Splash splash)
        {
            var imageWidth = Math.Ceiling(Window.instance.physicalSize.width);

            SplashApi.FetchSplashImage($"{splash.image}.{imageWidth}x0x1.jpg").Then(imageBytes => {
                File.WriteAllBytes(PATH + splash.image.GetHashCode(), imageBytes);
                var splashInfo = JsonConvert.SerializeObject(splash);
                PlayerPrefs.SetString(SPLASHINFOKEY, splashInfo);
            });
        }