Browse Source

特效修改代码调用方式

huangxiaoyue 2 years ago
parent
commit
b7f1269ecc

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Views/Arena/ArenaLoadingView.cs

@@ -7,11 +7,12 @@ namespace GFGGame
     public class ArenaLoadingView : BaseWindow
     {
         private UI_ArenaLoadingUI _ui;
-        private GameObject _effectObj;
-        private GoWrapper _wrapper;
+        private EffectUI _effectUI1;
 
         public override void Dispose()
         {
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
 
             if (_ui != null)
             {
@@ -29,8 +30,7 @@ namespace GFGGame
             this.viewCom = _ui.target;
             isfullScreen = true;
 
-            string resPath1 = ResPathUtil.GetViewEffectPath("ui_dljm", "ui_dljm_jdt_tw");
-            SceneController.AddObjectToView(null, null, _ui.m_holder, resPath1, out _effectObj, out _wrapper);
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holder, "ui_dljm", "ui_dljm_jdt_tw");
         }
 
         protected override void AddEventListener()

+ 9 - 13
GameClient/Assets/Game/HotUpdate/Views/Bag/GiftBoxSelectorView.cs

@@ -18,10 +18,8 @@ namespace GFGGame
         private int _selCount; //选择的数量
         private Dictionary<int, int> _selDic; //选择礼包内的物品<物品id,数量>
         private List<LongPressGesture> _listLongPress = new List<LongPressGesture>();
-        private GameObject _gameObject1;
-        private GameObject _gameObject2;
-        private GoWrapper _wrapper1;
-        private GoWrapper _wrapper2;
+        private EffectUI _effectUI1;
+        private EffectUI _effectUI2;
 
         public override void Dispose()
         {
@@ -38,6 +36,11 @@ namespace GFGGame
 
             _listLongPress.Clear();
 
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null;
+
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -95,23 +98,16 @@ namespace GFGGame
             _selDic.Clear();
             _selCount = 0;
 
-            SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
-            SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
-
             base.OnHide();
         }
 
         private void AddEffect()
         {
             //边框左上角特效
-            string resPath1 = ResPathUtil.GetViewEffectPath("ui_Activity", "Com_window_L_up");
-            SceneController.AddObjectToView(null, null, _ui.m_holderLeftTop, resPath1,
-                out _gameObject1, out _wrapper1);
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holderLeftTop, "ui_Activity", "Com_window_L_up");
 
             //边框右下角特效
-            string resPath2 = ResPathUtil.GetViewEffectPath("ui_Activity", "Com_window_R_Down");
-            SceneController.AddObjectToView(null, null, _ui.m_holderRightDowm, resPath2,
-                out _gameObject2, out _wrapper2);
+            _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_holderRightDowm, "ui_Activity", "Com_window_R_Down");
         }
 
         protected override void RemoveEventListener()

+ 4 - 5
GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/ClothingView.cs

@@ -13,8 +13,7 @@ namespace GFGGame
         private UI_ClothingUI _ui;
         private ValueBarController _valueBarController;
         private DressUpObjUI _dressUpObjUI;
-        private GameObject _gameobject1;
-        private GoWrapper _wrapper1;
+        private EffectUI _effectUI1;
 
         private List<int> _suitIds;//已解锁套装列表
         private SortedList _propertyList = new SortedList();
@@ -42,7 +41,8 @@ namespace GFGGame
                 _dressUpObjUI.Dispose();
                 _dressUpObjUI = null;
             }
-            SceneController.DestroyObjectFromView(_gameobject1, _wrapper1);
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
             _propertyList.Clear();
             _addPropertyList.Clear();
 
@@ -273,8 +273,7 @@ namespace GFGGame
         {
             _ui.m_comFosterAni.target.visible = true;
             _ui.m_comFosterAni.m_txtContent.text = string.Format("服装{0}中......", SuitFosterDataManager.Instance.stepNames[_index]);
-            string resPath = ResPathUtil.GetViewEffectPath("ui_gcdh", "ui_gcdh_" + (_index + 1));
-            SceneController.AddObjectToView(_gameobject1, _wrapper1, _ui.m_comFosterAni.m_holder, resPath, out _gameobject1, out _wrapper1);
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_comFosterAni.m_holder, "ui_gcdh", "ui_gcdh_" + (_index + 1));
 
             _ui.m_comFosterAni.m_t0.Play(() =>
             {

+ 4 - 6
GameClient/Assets/Game/HotUpdate/Views/Common/ModalStatusView.cs

@@ -7,8 +7,7 @@ namespace GFGGame
     public class ModalStatusView : BaseView
     {
         private UI_ModalStatusUI _ui;
-        private GameObject _gameObject0;
-        private GoWrapper _wrapper0;
+        private EffectUI _effectUI1;
 
         protected override void OnInit()
         {
@@ -28,9 +27,7 @@ namespace GFGGame
                 message = (string)viewData;
             }
             _ui.m_txtMessage.text = message;
-            string resPath0 = ResPathUtil.GetViewEffectPath("ui_cxlj", "ui_cxlj_gq");
-            SceneController.AddObjectToView(null, null, _ui.m_holder, resPath0, out _gameObject0, out _wrapper0);
-
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holder, "ui_cxlj", "ui_cxlj_gq");
         }
 
         protected override void OnHide()
@@ -39,7 +36,8 @@ namespace GFGGame
         }
         public override void Dispose()
         {
-            SceneController.DestroyObjectFromView(_gameObject0, _wrapper0);
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
             if (_ui != null)
             {
                 _ui.Dispose();

+ 6 - 5
GameClient/Assets/Game/HotUpdate/Views/CommonGame/FunctionOpenView.cs

@@ -9,11 +9,13 @@ namespace GFGGame
     {
         private UI_FunctionOpenUI _ui;
         List<string> _funList = new List<string>();
-        private GameObject _gameObject;
-        private GoWrapper _wrapper;
+        private EffectUI _effectUI1;
+
         public override void Dispose()
         {
-            SceneController.DestroyObjectFromView(_gameObject, _wrapper);
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -60,8 +62,7 @@ namespace GFGGame
                 this.Hide();
                 return;
             }
-            string resPath = ResPathUtil.GetViewEffectPath("ui_xjs", "ui_xjs");
-            SceneController.AddObjectToView(_gameObject, _wrapper, _ui.m_holder, resPath, out _gameObject, out _wrapper);
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holder, "ui_xjs", "ui_xjs");
             FunctionOpenCfg cfg = FunctionOpenCfgArray.Instance.GetCfg(_funList[0]);
             _ui.m_ComFunctionOpen.m_txtName.text = cfg.name;
             _ui.m_ComFunctionOpen.m_logIcon.url = ResPathUtil.GetCommonGameResPath(cfg.res);

+ 4 - 6
GameClient/Assets/Game/HotUpdate/Views/CommonGame/GetSuitItemVIew.cs

@@ -8,13 +8,13 @@ namespace GFGGame
     public class GetSuitItemVIew : BaseWindow
     {
         private UI_GetSuitItemUI _ui;
-        private GameObject _gameObject1;
-        private GoWrapper _wrapper1;
+        private EffectUI _effectUI1;
         private DressUpObjUI _dressUpObjUI;
 
         public override void Dispose()
         {
-            SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
             if (_dressUpObjUI != null)
             {
                 _dressUpObjUI.Dispose();
@@ -44,9 +44,7 @@ namespace GFGGame
             _dressUpObjUI = new DressUpObjUI("SceneDressUp");
             _ui.m_bg.onClick.Add(OnClickBg);
 
-            string resPath = ResPathUtil.GetViewEffectPath("ui_ck", "ui_ck_tz");
-            SceneController.AddObjectToView(null, null, _ui.m_holderEffect, resPath, out _gameObject1, out _wrapper1);
-
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holderEffect, "ui_ck", "ui_ck_tz");
         }
 
         protected override void OnShown()

+ 18 - 20
GameClient/Assets/Game/HotUpdate/Views/DailyWelfare/DailySupplyView.cs

@@ -14,14 +14,11 @@ namespace GFGGame
     {
         private UI_DailySupplyUI _ui;
         // private ValueBarController _valueBarController;
-        private GameObject _gameObject0;
-        private GameObject _gameObject1;
-        private GameObject _gameObject2;
-        private GameObject _gameObject3;
-        private GoWrapper _wrapper0;
-        private GoWrapper _wrapper1;
-        private GoWrapper _wrapper2;
-        private GoWrapper _wrapper3;
+        private EffectUI _effectUI1;
+        private EffectUI _effectUI2;
+        private EffectUI _effectUI3;
+        private EffectUI _effectUI4;
+
         private int _signCount;
         private int _month;
         private int _day;
@@ -34,10 +31,15 @@ namespace GFGGame
             //     _valueBarController.Dispose();
             //     _valueBarController = null;
             // }
-            SceneController.DestroyObjectFromView(_gameObject0, _wrapper0);
-            SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
-            SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
-            SceneController.DestroyObjectFromView(_gameObject3, _wrapper3);
+
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null;
+            EffectUIPool.Recycle(_effectUI3);
+            _effectUI3 = null;
+            EffectUIPool.Recycle(_effectUI4);
+            _effectUI4 = null;
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -62,14 +64,10 @@ namespace GFGGame
         }
         private void UpdateEffect()
         {
-            string resPath = ResPathUtil.GetViewEffectPath("ui_Activity", "Time_thing_book");
-            SceneController.AddObjectToView(null, null, _ui.m_holder, resPath, out _gameObject0, out _wrapper0);
-            string resPath1 = ResPathUtil.GetViewEffectPath("ui_Activity", "Time_thing_hudie");
-            SceneController.AddObjectToView(null, null, _ui.m_comSupply.m_holder, resPath1, out _gameObject1, out _wrapper1);
-
-            string resPath2 = ResPathUtil.GetViewEffectPath("ui_Activity", "Time_thing_zhuti");
-            SceneController.AddObjectToView(null, null, _ui.m_comSupply.m_comSupply0.m_holder, resPath2, out _gameObject2, out _wrapper2);
-            SceneController.AddObjectToView(null, null, _ui.m_comSupply.m_comSupply1.m_holder, resPath2, out _gameObject3, out _wrapper3);
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holder, "ui_Activity", "Time_thing_book");
+            _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_comSupply.m_holder, "ui_Activity", "Time_thing_hudie");
+            _effectUI3 = EffectUIPool.CreateEffectUI(_ui.m_comSupply.m_comSupply0.m_holder, "ui_Activity", "Time_thing_zhuti");
+            _effectUI4 = EffectUIPool.CreateEffectUI(_ui.m_comSupply.m_comSupply1.m_holder, "ui_Activity", "Time_thing_zhuti");
         }
         protected override void AddEventListener()
         {

+ 5 - 6
GameClient/Assets/Game/HotUpdate/Views/Guide/GuideView.cs

@@ -20,12 +20,13 @@ namespace GFGGame
 
         private float compTxtY = 0;//提示语位置
         private string txtContent = "";
-        private GameObject _gameObject;
-        private GoWrapper _wrapper;
+        private EffectUI _effectUI1;
 
         public override void Dispose()
         {
-            SceneController.DestroyObjectFromView(_gameObject, _wrapper);
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -46,8 +47,7 @@ namespace GFGGame
 
             _ui.m_loaMask.onClick.Add(OnClickTarget);
 
-            string resPath1 = ResPathUtil.GetViewEffectPath("ui_zjm", "ui_zjm_xszy");
-            SceneController.AddObjectToView(_gameObject, _wrapper, _ui.m_comHolder.m_holder, resPath1, out _gameObject, out _wrapper, 90);
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_comHolder.m_holder, "ui_zjm", "ui_zjm_xszy", 90);
         }
 
         protected override void OnShown()
@@ -126,7 +126,6 @@ namespace GFGGame
 
         protected override void OnHide()
         {
-
             base.OnHide();
             _ui.m_comHolder.target.visible = false;
             _ui.m_compTxt.target.visible = false;

+ 9 - 10
GameClient/Assets/Game/HotUpdate/Views/League/LeagueAnsweringView.cs

@@ -10,17 +10,18 @@ namespace GFGGame
     public class LeagueAnsweringView : BaseWindow
     {
         private UI_LeagueAnsweringUI _ui;
-        private GameObject _gameObject0;
-        private GameObject _gameObject1;
-        private GoWrapper _wrapper0;
-        private GoWrapper _wrapper1;
+        private EffectUI _effectUI1;
+        private EffectUI _effectUI2;
         private LeagueDataManager _dataManager;
         private List<long> _memberIds;
 
         public override void Dispose()
         {
-            SceneController.DestroyObjectFromView(_gameObject0, _wrapper0);
-            SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null;
+
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -50,10 +51,8 @@ namespace GFGGame
             _ui.m_listChat.SetVirtual();
             _ui.m_txtResult.onFocusOut.Add(OnFocuseOut);
 
-            string resPath = ResPathUtil.GetViewEffectPath("ui_league", "Answer_bgtx");
-            SceneController.AddObjectToView(null, null, _ui.m_holder, resPath, out _gameObject0, out _wrapper0);
-            string resPath1 = ResPathUtil.GetViewEffectPath("ui_league", "Answer_Succeed");
-            SceneController.AddObjectToView(null, null, _ui.m_holderHead, resPath1, out _gameObject1, out _wrapper1);
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holder, "ui_league", "Answer_bgtx");
+            _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_holderHead, "ui_league", "Answer_Succeed");
         }
         protected override void AddEventListener()
         {

+ 17 - 22
GameClient/Assets/Game/HotUpdate/Views/League/LeagueSkillUpView.cs

@@ -13,12 +13,9 @@ namespace GFGGame
     {
         private UI_LeagueSkillUpUI _ui;
         private ValueBarController _valueBarController;
-        private GameObject _gameObject0;
-        private GameObject _gameObject1;
-        private GameObject _gameObject2;
-        private GoWrapper _wrapper0;
-        private GoWrapper _wrapper1;
-        private GoWrapper _wrapper2;
+        private EffectUI _effectUI1;
+        private EffectUI _effectUI2;
+        private EffectUI _effectUI3;
         private List<GameObject> _gameObjects = new List<GameObject>();
         private List<GoWrapper> _wrappers = new List<GoWrapper>();
         private List<GComponent> _items = new List<GComponent>();
@@ -26,9 +23,13 @@ namespace GFGGame
         private int _type;
         public override void Dispose()
         {
-            SceneController.DestroyObjectFromView(_gameObject0, _wrapper0);
-            SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
-            SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null;
+            EffectUIPool.Recycle(_effectUI3);
+            _effectUI3 = null;
+
             // for (int i = 0; i < _gameObjects.Count; i++)
             // {
             //     SceneController.DestroyObjectFromView(_gameObjects[i], _wrappers[i]);
@@ -66,12 +67,9 @@ namespace GFGGame
 
             _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("lm_ch_jnbg");
 
-            string resPath = ResPathUtil.GetViewEffectPath("ui_league", "TEA");
-            SceneController.AddObjectToView(null, null, _ui.m_holder, resPath, out _gameObject0, out _wrapper0);
-            string resPath1 = ResPathUtil.GetViewEffectPath("ui_league", "tea_unlock");
-            SceneController.AddObjectToView(null, null, _ui.m_holderSkill, resPath1, out _gameObject1, out _wrapper1);
-            string resPath2 = ResPathUtil.GetViewEffectPath("ui_league", "tea_unlock");
-            SceneController.AddObjectToView(null, null, _ui.m_holderScore, resPath2, out _gameObject2, out _wrapper2, 90);
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holder, "ui_league", "TEA");
+            _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_holderSkill, "ui_league", "tea_unlock");
+            _effectUI3 = EffectUIPool.CreateEffectUI(_ui.m_holderScore, "ui_league", "tea_unlock");
         }
         protected override void AddEventListener()
         {
@@ -233,18 +231,15 @@ namespace GFGGame
 
             if (isLock && canActive && _gameObjects.Count <= index)
             {
-                GameObject gameObject = null;
-                GoWrapper wrapper = null;
+                EffectUI _effectUI;
                 GGraph holder = new GGraph();
                 holder.SetSize(1, 1);
                 holder.SetPosition(80, 80, 0);
                 holder.name = "holder";
                 item.target.AddChildAt(holder, 4);
-                string resPath = ResPathUtil.GetViewEffectPath("ui_league", "tea_nolearn");
-                SceneController.AddObjectToView(gameObject, wrapper, holder, resPath, out gameObject, out wrapper, 100);
-
-                _gameObjects.Add(gameObject);
-                _wrappers.Add(wrapper);
+                _effectUI = EffectUIPool.CreateEffectUI(holder, "ui_league", "tea_nolearn");
+                EffectUIPool.Recycle(_effectUI);
+                _effectUI = null;
                 _items.Add(item.target);
             }
             GObject gObject = item.target.GetChild("holder");

+ 5 - 5
GameClient/Assets/Game/HotUpdate/Views/Loading/LoadingView.cs

@@ -12,8 +12,7 @@ namespace GFGGame
         private const float SPEED = 0.01f;
         private string[] resNames = { "11", "33" };
 
-        private GameObject _effectObj;
-        private GoWrapper _wrapper;
+        private EffectUI _effectUI1;
 
         private static LoadingView m_Instance = null;
 
@@ -34,7 +33,8 @@ namespace GFGGame
             base.Dispose();
 
             m_Instance = null;
-            SceneController.DestroyObjectFromView(_effectObj, _wrapper);
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -50,8 +50,8 @@ namespace GFGGame
             _ui = UI_LoadingView.Create();
             this.viewCom = _ui.target;
             isfullScreen = true;
-            string resPath1 = ResPathUtil.GetViewEffectPath("ui_dljm", "ui_dljm_jdt_tw");
-            SceneController.AddObjectToView(null, null, _ui.m_holder, resPath1, out _effectObj, out _wrapper);
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holder, "ui_dljm", "ui_dljm_jdt_tw");
+
         }
 
         protected override void OnShown()

+ 9 - 12
GameClient/Assets/Game/HotUpdate/Views/Mail/MailView.cs

@@ -22,13 +22,16 @@ namespace GFGGame
         public bool _canShowContent = false;//获取内容数据返回前不可查看
         public List<MailInfo> mailInfos;//= new List<MailInfo>();
 
-        private GameObject _gameObject1;
-        private GameObject _gameObject2;
-        private GoWrapper _wrapper1;
-        private GoWrapper _wrapper2;
+        private EffectUI _effectUI1;
+        private EffectUI _effectUI2;
 
         public override void Dispose()
         {
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null;
+
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -203,8 +206,6 @@ namespace GFGGame
         }
         protected override void OnHide()
         {
-            SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
-            SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
             base.OnHide();
         }
         protected override void RemoveEventListener()
@@ -221,14 +222,10 @@ namespace GFGGame
         private void AddEffect()
         {
             //邊框左上角特效
-            string resPath1 = ResPathUtil.GetViewEffectPath("ui_Activity", "Com_window_L_up");
-            SceneController.AddObjectToView(null, null, _ui.m_holderLeftTop, resPath1,
-                out _gameObject1, out _wrapper1);
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holderLeftTop, "ui_Activity", "Com_window_L_up");
 
             //邊框右下角特效
-            string resPath2 = ResPathUtil.GetViewEffectPath("ui_Activity", "Com_window_R_Down");
-            SceneController.AddObjectToView(null, null, _ui.m_holderRightDowm, resPath2,
-                out _gameObject2, out _wrapper2);
+            _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_holderRightDowm, "ui_Activity", "Com_window_R_Down");
         }
     }
 }

+ 9 - 12
GameClient/Assets/Game/HotUpdate/Views/Notice/NoticeView.cs

@@ -7,13 +7,16 @@ namespace GFGGame
     public class NoticeView : BaseWindow
     {
         private UI_NoticeUI _ui;
-        private GameObject _gameObject1;
-        private GameObject _gameObject2;
-        private GoWrapper _wrapper1;
-        private GoWrapper _wrapper2;
+        private EffectUI _effectUI1;
+        private EffectUI _effectUI2;
 
         public override void Dispose()
         {
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null;
+
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -64,8 +67,6 @@ namespace GFGGame
 
         protected override void OnHide()
         {
-            SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
-            SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
             base.OnHide();
         }
         protected override void RemoveEventListener()
@@ -78,14 +79,10 @@ namespace GFGGame
         private void AddEffect()
         {
             //邊框左上角特效
-            string resPath1 = ResPathUtil.GetViewEffectPath("ui_Activity", "Com_window_L_up");
-            SceneController.AddObjectToView(null, null, _ui.m_holderLeftTop, resPath1,
-                out _gameObject1, out _wrapper1);
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holderLeftTop, "ui_Activity", "Com_window_L_up");
 
             //邊框右下角特效
-            string resPath2 = ResPathUtil.GetViewEffectPath("ui_Activity", "Com_window_R_Down");
-            SceneController.AddObjectToView(null, null, _ui.m_holderRightDowm, resPath2,
-                out _gameObject2, out _wrapper2);
+            _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_holderRightDowm, "ui_Activity", "Com_window_R_Down");
         }
 
         private void OnCtrlChange()

+ 9 - 12
GameClient/Assets/Game/HotUpdate/Views/RoleInfo/ChangeNameView.cs

@@ -9,13 +9,16 @@ namespace GFGGame
     public class ChangeNameView : BaseWindow
     {
         private UI_ChangeNameUI _ui;
-        private GameObject _gameObject1;
-        private GameObject _gameObject2;
-        private GoWrapper _wrapper1;
-        private GoWrapper _wrapper2;
+        private EffectUI _effectUI1;
+        private EffectUI _effectUI2;
 
         public override void Dispose()
         {
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null;
+
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -51,21 +54,15 @@ namespace GFGGame
 
         protected override void OnHide()
         {
-            SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
-            SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
             base.OnHide();
         }
         private void AddEffect()
         {
             //邊框左上角特效
-            string resPath1 = ResPathUtil.GetViewEffectPath("ui_Activity", "Com_window_L_up");
-            SceneController.AddObjectToView(null, null, _ui.m_holderLeftTop, resPath1,
-                out _gameObject1, out _wrapper1);
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holderLeftTop, "ui_Activity", "Com_window_L_up");
 
             //邊框右下角特效
-            string resPath2 = ResPathUtil.GetViewEffectPath("ui_Activity", "Com_window_R_Down");
-            SceneController.AddObjectToView(null, null, _ui.m_holderRightDowm, resPath2,
-                out _gameObject2, out _wrapper2);
+            _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_holderRightDowm, "ui_Activity", "Com_window_R_Down");
         }
 
         private void OnClickBtnSureAsync()

+ 9 - 13
GameClient/Assets/Game/HotUpdate/Views/RoleInfo/SettingView.cs

@@ -8,13 +8,16 @@ namespace GFGGame
     public class SettingView : BaseWindow
     {
         private UI_SettingUI _ui;
-        private GameObject _gameObject1;
-        private GameObject _gameObject2;
-        private GoWrapper _wrapper1;
-        private GoWrapper _wrapper2;
+        private EffectUI _effectUI1;
+        private EffectUI _effectUI2;
 
         public override void Dispose()
         {
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null;
+
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -46,22 +49,16 @@ namespace GFGGame
 
         protected override void OnHide()
         {
-            SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
-            SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
             base.OnHide();
         }
 
         private void AddEffect()
         {
             //邊框左上角特效
-            string resPath1 = ResPathUtil.GetViewEffectPath("ui_Activity", "Com_window_L_up");
-            SceneController.AddObjectToView(null, null, _ui.m_holderLeftTop, resPath1,
-                out _gameObject1, out _wrapper1);
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holderLeftTop, "ui_Activity", "Com_window_L_up");
 
             //邊框右下角特效
-            string resPath2 = ResPathUtil.GetViewEffectPath("ui_Activity", "Com_window_R_Down");
-            SceneController.AddObjectToView(null, null, _ui.m_holderRightDowm, resPath2,
-                out _gameObject2, out _wrapper2);
+            _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_holderRightDowm, "ui_Activity", "Com_window_R_Down");
         }
 
         private void OnClickBtnExit()
@@ -74,7 +71,6 @@ namespace GFGGame
                 });
         }
 
-
         private void OnClickBtnLogout()
         {
             AlertSystem.Show("确认注销当前账号吗?")