Ejemplo n.º 1
0
        public void OnCropAndSetWallpaperFromFile()
        {
            AGGallery.PickImageFromGallery(
                selectedImage =>
            {
                var imageTexture2D = selectedImage.LoadTexture2D();

                var msg = string.Format("{0} was loaded from gallery with size {1}x{2}",
                                        selectedImage.OriginalPath, imageTexture2D.width, imageTexture2D.height);
                AGWallpaperManager.ShowCropAndSetWallpaperChooser(selectedImage.OriginalPath, null, true, AGWallpaperManager.WallpaperType.Lock);

                // Clean up
                Resources.UnloadUnusedAssets();

                AGUIMisc.ShowToast(msg);
                Debug.Log(msg);
            },
                errorMessage => AGUIMisc.ShowToast("Cancelled picking image from gallery: " + errorMessage));
        }
Ejemplo n.º 2
0
 public void OnCropAndSetWallpaperFromTexture()
 {
     AGWallpaperManager.ShowCropAndSetWallpaperChooser(wallpaperTexture);
 }