/// <summary> /// 判断非资源信息是否存在. /// </summary> /// <returns><c>true</c>, 村贼, <c>false</c> 不存在.</returns> /// <param name="iUnResourcePath">非资源路径.</param> /// <param name="iBur">非资源信息.</param> private bool IsUnResoureExist(string iUnResourcePath, out BundleUnResource iBur) { var bolRet = false; iBur = null; foreach (var bur in UnResources) { if (bur.path != iUnResourcePath) { continue; } iBur = bur; bolRet = true; break; } return(bolRet); }
/// <summary> /// 添加非App资源信息. /// </summary> /// <param name="iUnResourcePath">非App资源信息</param> public BundleUnResource AddUnResource(string iUnResourcePath) { BundleUnResource bur; // 不存在存在 if (IsUnResoureExist(iUnResourcePath, out bur) == false) { bur = new BundleUnResource(); UnResources.Add(bur); } if (bur != null) { bur.path = iUnResourcePath; UtilsAsset.SetAssetDirty(this); } else { this.Error("AddUnResource()::Failed!!!(AssetPath:{0})", iUnResourcePath); } return(bur); }
/// <summary> /// 添加非App资源信息. /// </summary> /// <param name="iUnResourceInfo">非App资源信息</param> public BundleUnResource AddUnResource(BundleUnResource iUnResourceInfo) { return(iUnResourceInfo == null ? null : AddUnResource(iUnResourceInfo.path)); }