public static string[] ScreenCaptureAndSave() { ReadExternalFilesTools.CreateFolder(m_PhotoPath); string name = DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss") + ".png"; Application.CaptureScreenshot(m_PhotoPath + "/" + name); MyDebug.Log(m_PhotoPath + "/" + name, MyColor.State.red); return(new string[2] { m_PhotoPath, name }); }
public static void ChangeVideo(MediaPlayer media) { _Paths = ReadExternalFilesTools.FindAllFiles(Application.streamingAssetsPath, ".mp4"); media.m_VideoPath = _Paths[_VideoIndex]; _VideoIndex = (_VideoIndex + 1) % (_Paths.Count); if (string.IsNullOrEmpty(media.m_VideoPath)) { media.CloseVideo(); _VideoIndex = 0; } else { media.OpenVideoFromFile(_location, media.m_VideoPath, true); } }
public static void ChangeVideo(MediaPlayer media, string name, bool isOn) { _Paths = ReadExternalFilesTools.FindAllFiles(Application.streamingAssetsPath, ".mp4"); for (int i = 0; i < _Paths.Count; i++) { if (_Paths[i].Split('\\')[_Paths[i].Split('\\').Length - 1].Replace(".mp4", "").Equals(name)) { media.m_VideoPath = _Paths[i]; if (string.IsNullOrEmpty(media.m_VideoPath)) { media.CloseVideo(); _VideoIndex = 0; } else { Debug.Log(_Paths[i]); media.OpenVideoFromFile(_location, media.m_VideoPath, isOn); } } } }