Created
October 30, 2019 08:52
-
-
Save kurokuru/6989d71ce9e946a86f244720680db4a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEngine.ResourceManagement.ResourceLocations; | |
namespace UnityEngine.ResourceManagement.ResourceProviders | |
{ | |
// Token: 0x0200001A RID: 26 | |
public class CustomAssetBundleProvider : ResourceProviderBase | |
{ | |
// Token: 0x060000C7 RID: 199 RVA: 0x00004E45 File Offset: 0x00003045 | |
public override void Provide(ProvideHandle providerInterface) | |
{ | |
new CustomAssetBundleResource().Start(providerInterface); | |
} | |
// Token: 0x060000C8 RID: 200 RVA: 0x00004E54 File Offset: 0x00003054 | |
public override Type GetDefaultType(IResourceLocation location) | |
{ | |
return typeof(IAssetBundleResource); | |
} | |
// Token: 0x060000C9 RID: 201 RVA: 0x00004E70 File Offset: 0x00003070 | |
public override void Release(IResourceLocation location, object asset) | |
{ | |
bool flag = location == null; | |
if (flag) | |
{ | |
throw new ArgumentNullException("location"); | |
} | |
bool flag2 = asset == null; | |
if (flag2) | |
{ | |
Debug.LogWarningFormat("Releasing null asset bundle from location {0}. This is an indication that the bundle failed to load.", new object[] | |
{ | |
location | |
}); | |
} | |
else | |
{ | |
CustomAssetBundleResource bundle = asset as CustomAssetBundleResource; | |
bool flag3 = bundle != null; | |
if (flag3) | |
{ | |
bundle.Unload(); | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment