public override void Unload() { var assetBundle = Asset as AssetBundle; if (assetBundle != null) { assetBundle.Unload(true); } mResLoader.UnloadAllAssets(); mResLoader = null; }
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; }