private void OpenBundle(string filename, bool forward = true) { folderLevel = FolderLevel.SubFolderLevelOne; AllNodeStrings.Clear(); currentPath.Add(filename); this.bundleName = (BundleItem.BundleNames)Enum.Parse(typeof(BundleItem.BundleNames), filename); // AssetBundleRequest req = AssetBundleManager.RequestBundle(this.bundleName); AssetBundleCreateRequest a = AssetBundleManager.GetAssetBundle(this.bundleName); ab = a.assetBundle; bundleItems = TODV2.GetItemByBundle(this.bundleName); foreach (BundleItem b in bundleItems) { string[] tokens = b.path.Split(','); string next; if (currentFolderIndex < tokens.Length) { next = tokens[currentFolderIndex]; if (next.ToLower() != "hidden" || Application.isEditor || Debug.isDebugBuild) { AllNodeStrings.Add(next + ".subfolder"); } } } AllNodeStrings = AllNodeStrings.Distinct().ToList(); if (forward) { ResetCurrentPage(); } else { GetSavedPage(); } BuildNodes(); }
public static List <BundleItem> GetItemByBundle(BundleItem.BundleNames bn) { return(_tod.FindAll(x => x.bundle == bn)); }
public static AssetBundleCreateRequest GetAssetBundle(BundleItem.BundleNames bn) { switch (bn) { case BundleItem.BundleNames.Staging: return(Staging); case BundleItem.BundleNames.Assorted_Low_Poly: return(Assorted_Low_Poly); case BundleItem.BundleNames.Custom_Rooms_1: return(Custom_Rooms_1); case BundleItem.BundleNames.Custom_Ships_1: return(Custom_Ships_1); case BundleItem.BundleNames.HQ_Interiors: return(Hq_Interiors); case BundleItem.BundleNames.HQ_Space: return(Hq_Space); case BundleItem.BundleNames.Low_Poly_Town: return(Low_Poly_Town); case BundleItem.BundleNames.Nature: return(Nature); case BundleItem.BundleNames.Voxels: return(Voxels); case BundleItem.BundleNames.Cartoon_Apocalypse: return(Cartoon_Apocalypse); case BundleItem.BundleNames.Polygon_Fantasy: return(Polygon_Fantasy); case BundleItem.BundleNames.Low_Poly_Apocalypse: return(Low_Poly_Apocalypse); case BundleItem.BundleNames.HQ_Dungeons1: return(Hq_Dungeons1); case BundleItem.BundleNames.Characters: return(Characters); case BundleItem.BundleNames.Pigeons_War: return(Pigeons_War); case BundleItem.BundleNames.Effects: return(Effects); case BundleItem.BundleNames.Decals: return(Decals); case BundleItem.BundleNames.Chat_Bubbles: return(Chat_Bubbles); case BundleItem.BundleNames.Polygon_Pirates: return(Polygon_Pirates); case BundleItem.BundleNames.Terrain: return(Terrain); default: return(Polygon_Adventure); } }