コード例 #1
0
            // Token: 0x0600060B RID: 1547 RVA: 0x0001D1FC File Offset: 0x0001B3FC
            public bool LoadAsync(string path, Type type, out AssetBundleRequest request)
            {
                short[] array;
                if (!this.TypeIndices(type, out array))
                {
                    request = null;
                    return(false);
                }
                int i = 0;

                while (array[i] >= 0)
                {
                    if (this.AllLoadedBundleAssetLists[(int)array[i]].LoadAsync(path, out request))
                    {
                        return(true);
                    }
                    if (++i >= array.Length)
                    {
                        request = null;
                        return(false);
                    }
                }
                while (i < array.Length)
                {
                    Bundling.LoadedBundleListOfAssets loadedBundleListOfAssets = this.AllLoadedBundleAssetLists[(int)(-(int)(array[i] + 1))];
                    if (loadedBundleListOfAssets.LoadAsync(path, type, out request))
                    {
                        return(true);
                    }
                    i++;
                }
                request = null;
                return(false);
            }
コード例 #2
0
            // Token: 0x0600060A RID: 1546 RVA: 0x0001D15C File Offset: 0x0001B35C
            public bool Load(string path, Type type, out Object asset)
            {
                short[] array;
                if (!this.TypeIndices(type, out array))
                {
                    Debug.Log("no type index for " + type);
                    asset = null;
                    return(false);
                }
                int i = 0;

                while (array[i] >= 0)
                {
                    if (this.AllLoadedBundleAssetLists[(int)array[i]].Load(path, out asset))
                    {
                        return(true);
                    }
                    if (++i >= array.Length)
                    {
                        asset = null;
                        return(false);
                    }
                }
                while (i < array.Length)
                {
                    Bundling.LoadedBundleListOfAssets loadedBundleListOfAssets = this.AllLoadedBundleAssetLists[(int)(-(int)(array[i] + 1))];
                    if (loadedBundleListOfAssets.Load(path, type, out asset))
                    {
                        return(true);
                    }
                    i++;
                }
                asset = null;
                return(false);
            }
コード例 #3
0
            // Token: 0x0600060D RID: 1549 RVA: 0x0001D2B0 File Offset: 0x0001B4B0
            public IEnumerable <Object> LoadAll(Type type)
            {
                short[] indices;
                if (!this.TypeIndices(type, out indices))
                {
                    yield break;
                }
                int i = 0;

                while (indices[i] >= 0)
                {
                    foreach (Bundling.LoadedBundle bundle in this.AllLoadedBundleAssetLists[(int)indices[i]].Bundles)
                    {
                        foreach (Object asset in bundle.LoadAll())
                        {
                            yield return(asset);
                        }
                    }
                    if (++i >= indices.Length)
                    {
                        yield break;
                    }
                }
                while (i < indices.Length)
                {
                    Bundling.LoadedBundleListOfAssets test = this.AllLoadedBundleAssetLists[(int)(-(int)(indices[i] + 1))];
                    foreach (Bundling.LoadedBundle bundle2 in test.Bundles)
                    {
                        foreach (Object asset2 in bundle2.LoadAll(type))
                        {
                            yield return(asset2);
                        }
                    }
                    if (++i >= indices.Length)
                    {
                        break;
                    }
                }
                yield break;
            }