private void LoadFX(List <String> fxs, Action callback, Action <int> process = null) { //Debug.LogError("preload avater fx: " + fxs.PackList('\n')); AssetCacheMgr.GetResourcesAutoRelease(fxs.ToArray(), (fxsObj) => { foreach (var item in fxs) { SfxHandler.AddloadedFX(item); } //foreach (var item in fxsObj) //{ // var go = GameObject.Instantiate(item); // GameObject.Destroy(go); //} //sw.Stop(); //Debug.LogInfo("preload fx time: " + sw.ElapsedMilliseconds); if (callback != null) { callback(); } }, (progress) => { if (process != null) { process((int)(10 * progress + 80)); } }); }