//Set the extension to the dropdown and set MIME type to the list from the specified extensions. //指定された拡張子から、ドロップダウンに拡張子をセットし、リストに MIME type をセットする。 private void CreateExtAndMimeListToDropdown(Dropdown dropdown, ref List <string[]> mimeList, string[] extArray, bool addTextAll = true) { if (dropdown == null || extArray == null || extArray.Length == 0) { return; } List <string> extList = new List <string>(); mimeList = new List <string[]>(); if (addTextAll) { extList.Add("*"); mimeList.Add(new string[] { AndroidMimeType.File.TextAll }); } foreach (var ext in extArray) { extList.Add(ext); var mime = AndroidMimeType.GetMimeType(ext); if (mime != null) { mimeList.Add(mime); } else { mimeList.Add(new string[] { AndroidMimeType.File.All }); } } dropdown.ClearOptions(); dropdown.AddOptions(extList); }