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)); }
private IEnumerator waitForStringToLoad <TAsset>(AsyncAssetRequest <TAsset> assetRequest, AssetRequest <string> stringRequest, string key, AssetLoadedHandler <TAsset> handler) where TAsset : class { yield return(stringRequest); string jsonString = stringRequest.Asset; JsonService json = Service.Get <JsonService>(); TAsset jsonAsset = json.Deserialize <TAsset>(jsonString); assetRequest.Request = new IndexedAssetRequest <TAsset>(key, jsonAsset); handler?.Invoke(key, jsonAsset); }