private static void m_CheckCircularReference(CircularReferenceSet set, AssetBundleManifest manifest)
 {
     HFLog.C("--------------------------------------");
     HFLog.C("开始检测 " + set.name);
     string[] str = manifest.GetAllDependencies(set.name);
     foreach (var item in str)
     {
         m_CheckCircularReference(set, item, manifest);
     }
     HFLog.C("检测完成√ " + set.name);
 }
        public static void CheckCircularReference()
        {
            string              path     = Application.streamingAssetsPath + "/" + "AssetBundles" + "/" + "AssetBundles";
            AssetBundle         bundle   = AssetBundle.LoadFromFile(path);
            AssetBundleManifest manifest = (AssetBundleManifest)bundle.LoadAsset("AssetBundleManifest");

            string[] names = manifest.GetAllAssetBundles();
            foreach (var item in names)
            {
                CircularReferenceSet set = new CircularReferenceSet();
                set.name = item;
                m_CheckCircularReference(set, manifest);
            }
            bundle.Unload(true);
        }
        private static void m_CheckCircularReference(CircularReferenceSet set, string name, AssetBundleManifest manifest)
        {
            if (set.Contains(name))
            {
                HFLog.E("循环引用 " + set.name + "   " + name);
                return;
            }

            HFLog.C("检测中 " + set.name + "  " + name);

            set.Add(name);

            string[] str = manifest.GetAllDependencies(name);
            foreach (var item in str)
            {
                m_CheckCircularReference(set, item, manifest);
            }
        }