Skip to content

Instantly share code, notes, and snippets.

@yosun
Created December 23, 2017 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yosun/61413dd247ce52ae9807eb93c9b673ea to your computer and use it in GitHub Desktop.
Save yosun/61413dd247ce52ae9807eb93c9b673ea to your computer and use it in GitHub Desktop.
SaveToAlbum.cs saves gif given path
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO;
using System.Collections;
using System.Runtime.InteropServices;
public class SaveToAlbum : MonoBehaviour {
#if !UNITY_EDITOR
[DllImport("__Internal")] // https://gist.github.com/yosun/89f256b66141ec914e2b54c66c91c798
private static extern int saveGifToGallery( string path );
#endif
public static void SaveFile(string path){
print ("SaveFile " + path);
#if !UNITY_EDITOR
saveGifToGallery (path);
#endif
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment