예제 #1
0
        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");
            }
        }
예제 #2
0
        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("");
            }
        }