Created
December 23, 2017 10:56
-
-
Save yosun/61413dd247ce52ae9807eb93c9b673ea to your computer and use it in GitHub Desktop.
SaveToAlbum.cs saves gif given path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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