public bool UnloadAsset(Object asset) { if (asset != null) {// 判定传入的asset是否为空 Resources.UnloadAsset(asset); // 卸载此Asset资源 return true; } // 释放Asset资源失败 Debug.LogError($"{GetType()}/UnlLoadAsset方法传入的参数asset=null,无法卸载空资源"); return false; }
public void UnloadAsset(UnityEngine.Object asset) { if (assetLoader != null) { assetLoader.UnloadAsset(asset); } }