MockGalleryDataProvider.cs 705 B

123456789101112131415161718192021222324
  1. using System;
  2. using System.IO;
  3. using UnityEngine;
  4. namespace NRKernal.NRExamples
  5. {
  6. public class MockGalleryDataProvider
  7. {
  8. public void InsertImage(byte[] data, string displayName, string folderName)
  9. {
  10. string path = string.Format("{0}/NrealShots/{1}", Application.persistentDataPath, folderName);
  11. if (!Directory.Exists(path))
  12. {
  13. Directory.CreateDirectory(path);
  14. }
  15. File.WriteAllBytes(string.Format("{0}/{1}", path, displayName), data);
  16. }
  17. public AndroidJavaObject InsertVideo(string originFilePath, string displayName, string folderName)
  18. {
  19. return null;
  20. }
  21. }
  22. }