예제 #1
0
        public override void Unload()
        {
            var assetBundle = Asset as AssetBundle;

            if (assetBundle != null)
            {
                assetBundle.Unload(true);
            }
            mResLoader.UnloadAllAssets();
            mResLoader = null;
        }
예제 #2
0
        public override void Unload()
        {
            // prefab 资源不能用 Resources.UnloadAsset 清除
            if (Asset is GameObject)
            {
            }
            else
            {
                Resources.UnloadAsset(Asset);
            }

            Asset = null;

            mResLoader.UnloadAllAssets();
            mResLoader = null;
        }
 private void OnDestroy()
 {
     mResLoader.UnloadAllAssets();
     mResLoader = null;
 }