/// <summary> /// 异步加载 /// </summary> /// <param name="callback"></param> public void AsyncLoad(Action callback) { // JDeBug.Inst.Log("开始任务:" + resourcePath); CResources.AsyncLoad <GameObject>(resourcePath, (bool result, GameObject o) => { var go = GameObject.Instantiate(o); Transform = go.transform; Transform.gameObject.SetActive(false); IsLoad = true; //自动查找节点 UITools.AutoSetTransformPath(this); Init(); if (callback != null) { callback(); } }); }