/// <summary> /// 创建面板 /// </summary> IEnumerator StartCreatePanel(string name, AssetBundle bundle, LuaTable luaTable = null, LuaFunction func = null) { //Debug.Log("从AssetBundle中加载:" + name); //name += "Panel"; // GameObject prefab = Util.LoadAsset(bundle, name); // yield return new WaitForEndOfFrame(); // if (Parent.FindChild(name) != null || prefab == null) { // yield break; // } GameObject go = ObjectPoolManager.Instance.LoadObjectByName(name, Parent); // go.name = name; yield return(new WaitForEndOfFrame()); Util.AddComponent <LuaBehaviour>(go); if (func != null) { func.Call(luaTable, go); } //Debug.Log("StartCreatePanel------>>>>" + name); }