--[[ 资源池设置: 可根据内存高低来设置参数,高内存的Fadeout可以相对设置的大一点 部分问题: 1、DivineWeapon Editor下用prefab方便制作,使用做成数据类(徐倩) 2、部分UI界面比较频繁,是否可以用池子配置,比如主界面 3、特效PsRoot机制直接引用资源,导致特效不能复用,比如Weapon_right_LV1,战斗和主城不公用导致重复创建资源池 4、场景阻挡元素,目前是之前在场景上加载了许多,然后隐藏,有点浪费 5、一些UIEffect特效,虽然勾选了PlayOnStartup,但是节点是隐藏的,但此时仍然会执行播放特效机制PT_UI_toushitishi_01 6、武器池子数 ]] do TK2API.SetAssetBundleCheckInterval(-1) --池子的配置 local AssetPoolCfgList = { {Pattern = "RENDER_ENTITY", Capacity = 40}, {Pattern = "EMPTY_GAME_OBJECT", Capacity = 40}, --UI {Pattern = ConstAssetPathConfig.Pattern, Capacity = 100}, {Pattern = ConstAssetPathConfig.Pattern2, Fadeout = 300}, --相机配置 {Pattern = ConstAssetPathConfig.Pattern3, Fadeout = 300}, --角色相关 {Pattern = ConstAssetPathConfig.Pattern4, Fadeout = 1000}, {Pattern = ConstAssetPathConfig.Pattern5, Fadeout = 1000}, {Pattern = ConstAssetPathConfig.Pattern6, Fadeout = 1000}, {Pattern = ConstAssetPathConfig.Pattern7, Fadeout = 300}, {Pattern = ConstAssetPathConfig.Pattern8, Capacity = 100}, {Pattern = ConstAssetPathConfig.Pattern9, Fadeout = 300}, {Pattern = ConstAssetPathConfig.Pattern10, Capacity = 80, Fadeout = 5}, {Pattern = ConstAssetPathConfig.EmptyModelPath, Fadeout = 1000}, --特效 {Pattern = ConstAssetPathConfig.Pattern11, Capacity = 25, Fadeout = 200}, {Pattern = ConstAssetPathConfig.Pattern12, Capacity = 25, Fadeout = 100}, {Pattern = ConstAssetPathConfig.Pattern13, Capacity = 100, Fadeout = 100}, } for __, assetPoolCfg in ipairs(AssetPoolCfgList) do if assetPoolCfg.Capacity then AuxUtil.AssetPoolSetCapacity(assetPoolCfg.Pattern, assetPoolCfg.Capacity) end if assetPoolCfg.Fadeout then AuxUtil.AssetPoolSetFadeout(assetPoolCfg.Pattern, assetPoolCfg.Fadeout) end end end