public void UnloadAsset(string path) { path = path.Replace("\\", "/"); path = string.Format(basePath, path.Replace("\\", "/")); string assetBundleName = AssetBundleAssetRecord.GetAssetBundleName(path); ABsManager.Unload(assetBundleName); }
public static void RemovePre() { if (m_pre) { if (!string.IsNullOrEmpty(m_pre.assetBundleName)) { ABsManager.Unload(m_pre.assetBundleName); } GameObject.Destroy(m_pre.gameObject); } }
public void Clear() { for (int i = 0; i < list.Count; i++) { if (!isDontDestroyOnload(list[i])) { ABsManager.Unload(list[i].assetbundleName); } else { lastSceneRemains.Add(list[i]); } } }
void LateUpdate() { if (Time.time - time > 0f) { time = Time.time + 1f; for (int i = 0; i < list.Count; i++) { CheckInf(list[i]); if (list[i].refCount == 0) { ABsManager.Unload(list[i].assetbundleName); list.RemoveAt(i); } } } }