Exemple #1
0
        public override TAsset LoadImmediate <TAsset>(string deviceList, ref ContentManifest.AssetEntry entry)
        {
            string      stringToDeserialize = DeviceManager.LoadImmediate <string>(deviceList, ref entry);
            JsonService jsonService         = Service.Get <JsonService>();

            return(jsonService.Deserialize <TAsset>(stringToDeserialize));
        }
Exemple #2
0
        public override TAsset LoadImmediate <TAsset>(string deviceList, ref ContentManifest.AssetEntry entry)
        {
            if (bundleManager.IsMounted(entry.BundleKey))
            {
                return(bundleManager.GetBundle(entry.BundleKey).LoadImmediate <TAsset>(entry.Key, entry.AssetPath));
            }
            List <string> list = new List <string>();

            list.Add(entry.BundleKey);
            List <string> list2 = list;

            list2.AddRange(bundleManager.GetDependencyKeys(entry.BundleKey));
            BundleMount[] array = new BundleMount[list2.Count];
            for (int i = 0; i < list2.Count; i++)
            {
                string text = list2[i];
                ContentManifest.AssetEntry entry2 = createBundleEntry(text, deviceList, bundleManager.GetBundleEntry(text));
                if (!bundleManager.IsMounted(text))
                {
                    AssetBundle bundle      = DeviceManager.LoadImmediate <AssetBundle>(deviceList, ref entry2);
                    BundleMount bundleMount = (array[i] = bundleManager.MountBundle(text, bundle, deviceList.Contains("sa-bundle")));
                }
                else
                {
                    array[i] = bundleManager.GetBundle(text);
                }
            }
            BundleMount bundleMount2 = array[0];

            return(bundleMount2.LoadImmediate <TAsset>(entry.Key, entry.AssetPath));
        }
Exemple #3
0
        private TAsset loadImmediate <TAsset>(string key) where TAsset : class
        {
            ContentManifest.AssetEntry entry = getAssetEntry(key);
            TAsset val = getIndexedAsset <TAsset>(entry.Key);

            if (val == null)
            {
                val = deviceManager.LoadImmediate <TAsset>(entry.DeviceList, ref entry);
                assetIndex.Add(entry.Key, val);
            }
            return(val);
        }
        public override TAsset LoadImmediate <TAsset>(string deviceList, ref ContentManifest.AssetEntry entry)
        {
            TextAsset textAsset = DeviceManager.LoadImmediate <TextAsset>(deviceList, ref entry);

            return((TAsset)(object)textAsset.text);
        }