소스 검색

添加加载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;
             }