protected void UnloadAssetBundleInternal(string assetBundleName) { LoadedAssetBundle bundle = GetLoadedAssetBundle(assetBundleName); if (bundle == null) { return; } if (--bundle.m_ReferencedCount == 0) { m_LoadedAssetBundles.Remove(assetBundleName); bundle.m_AssetBundle.Unload(true); DebugHandler.Log(assetBundleName + " has been unloaded successfully"); } }
public static string GetFileMD5(string filePath) { try { FileInfo fileTmp = new FileInfo(filePath); if (fileTmp.Exists) { FileStream fs = new FileStream(filePath, FileMode.Open); int len = (int)fs.Length; byte[] data = new byte[len]; fs.Close(); return(GetMD5(data)); } return(""); } catch (FileNotFoundException e) { DebugHandler.Log(e.Message); return(""); } }