public bool Remove(IAssetBundle item) { if (item == null) { return(false); } if (item == _resources) { _resources = null; return(true); } return(_bundles.Remove(item)); }
public void Add(IAssetBundle bundle) { if (bundle == null) { throw new System.ArgumentNullException("bundle"); } if (bundle is AssetBundleGroup) { if (bundle == this || (bundle as AssetBundleGroup).ContainsDeep(this)) { throw new System.ArgumentException("Bundle being added to group would result in a circular relationship."); } } else if (bundle is ResourcesAssetBundle) { _resources = bundle as ResourcesAssetBundle; } else { _bundles.Add(bundle); } }
public void Clear() { _resources = null; _bundles.Clear(); }