private GameObject PushRepeatableLayer(string name, string fileName, UIChangeDelegate callback = null, bool isFreePop = true) { if (uiDatas.GetObjectValue(name) != null) { Debug.LogWarning("QIPAWORLD:重复添加UI--" + name); return(null); } GameObject uiLoad = LoadObjManager.Instance.GetLoadObj <GameObject>("UIPrefabs/" + fileName); GameObject ui = GameObject.Instantiate <GameObject>(uiLoad, GameObject.Find("Canvas").transform); UIData uiData = ui.AddComponent <UIData>(); uiData.uiName = name; uiData.changeCallback = callback; uiDatas.SetObjectValue(name, ui); uiNameList.Add(name); uiData.SetFreePop(isFreePop); return(ui); }