public void OnSetWallpaperFromFilePath() { AGGallery.PickImageFromGallery( selectedImage => { var imageTexture2D = selectedImage.LoadTexture2D(); string msg = string.Format("{0} was loaded from gallery with size {1}x{2}", selectedImage.OriginalPath, imageTexture2D.width, imageTexture2D.height); AGUIMisc.ShowToast(msg); Debug.Log(msg); AGWallpaperManager.SetWallpaper(selectedImage.OriginalPath); // Clean up Resources.UnloadUnusedAssets(); }, errorMessage => AGUIMisc.ShowToast("Cancelled picking image from gallery: " + errorMessage)); }
public void OnSetLockScreenWallpaperFromTexture() { var rect = new AndroidRect(0, 0, 400, 400); AGWallpaperManager.SetWallpaper(wallpaperTexture, rect, true, AGWallpaperManager.WallpaperType.Lock); }
public void OnSetWallpaperFromTexture() { AGWallpaperManager.SetWallpaper(wallpaperTexture, null, true, AGWallpaperManager.WallpaperType.System); }
public void OnSetWallpaperFromTexture() { AGWallpaperManager.SetWallpaper(wallpaperTexture); }