public static void UnLoadAsset(string url, bool isForceDelete = false) { ResourcesLoader resourcesLoader = ResourcesLoaderMgr.GetExitLoaderInstance <ResourcesLoader>(url); if (resourcesLoader == null) { return; } resourcesLoader.ReduceReference(resourcesLoader, isForceDelete); }
/// <summary> /// 卸载指定的资源 /// </summary> /// <param name="url"></param> /// <param name="requestTarget">为null 则卸载加载时候请求的对象</param> public static void UnLoadAsset(string url, bool isForceDelete = false) { TextAssetLoader textAssetLoader = ResourcesLoaderMgr.GetExitLoaderInstance <TextAssetLoader>(url); if (textAssetLoader == null) { //Debug.LogError("无法获取指定类型的加载器 " + typeof(TextAssetLoader)); return; } textAssetLoader.ReduceReference(textAssetLoader, isForceDelete); }
public static void UnLoadAsset(string url, object requestTarget = null) { MaterialLoader materialLoader = ResourcesLoaderMgr.GetExitLoaderInstance <MaterialLoader>(url); if (materialLoader == null) { //Debug.LogError("无法获取指定类型的加载器 " + typeof(materialLoader)); return; } if (requestTarget == null) { requestTarget = materialLoader.m_RequesterTarget; } materialLoader.ReduceReference(materialLoader, false); }