浏览代码

添加加载live2d判空

leiyasi 1 年之前
父节点
当前提交
82a461d141
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      GameClient/Assets/Game/HotUpdate/Views/Common/Controller/LuckyBoxController.cs

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/LuckyBoxController.cs

@@ -195,9 +195,10 @@ namespace GFGGame
         {
             _index ^= 1;
         }
+
         private bool InitModel(int index)
         {
-            if (_dressUpObjUIs[index].sceneObject == null)
+            if (index >= _dressUpObjUIs.Count || _dressUpObjUIs[index].sceneObject == null)
             {
                 return false;
             }