Skip to content

Instantly share code, notes, and snippets.

@peroon
Created December 21, 2015 09:01
Show Gist options
  • Select an option

  • Save peroon/30ab6255901e28b07526 to your computer and use it in GitHub Desktop.

Select an option

Save peroon/30ab6255901e28b07526 to your computer and use it in GitHub Desktop.
// 動画リストをフォルダ内のファイルから作成
string movieDir = "Assets/StreamingAssets/movie";
DirectoryInfo dir = new DirectoryInfo(movieDir);
FileInfo[] info = dir.GetFiles("*.mp4");
movieFileList = new List<string> ();
foreach (FileInfo f in info) {
string fileName = f.ToString ().Split ('/').Last();
string filePath = "movie/" + fileName;
//Debug.Log ("filePath : " + filePath);
this.movieFileList.Add (filePath);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment