/// <summary> /// 对各个组件获得对应的资源打包器。 /// 添加打包器之后要在ResourceMgr中的GetRefAssetUnpacker中添加相应的解包器 /// </summary> /// <param name="composType"></param> /// <returns></returns> protected virtual IRefResPacker GetRefResPacker(System.Type composType) { IRefResPacker refAssetPacker = null; if (mCustomResPackerDict.TryGetValue(composType, out refAssetPacker)) { return(refAssetPacker); } if (onlyCustomPacker) { return(null); } return(refAssetPacker); }
public virtual void AddCustomResPacker(System.Type type, IRefResPacker refResPacker) { mCustomResPackerDict.Add(type, refResPacker); }