소스 검색

为啥会有这种bug

wartheking 9 달 전
부모
커밋
6de691c5b6
2개의 변경된 파일114개의 추가작업 그리고 2개의 파일을 삭제
  1. 98 1
      Assets/Scene 1.unity
  2. 16 1
      Assets/Scripts/UI/UIView/YZT/YZTLayer.cs

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 98 - 1
Assets/Scene 1.unity


+ 16 - 1
Assets/Scripts/UI/UIView/YZT/YZTLayer.cs

@@ -325,7 +325,8 @@ public class YZTLayer : YZTRootLayer
                     viewMode = ViewMode.normal;
                     StaticLod.instance.OnFoucusStatic(newPoint.staticImp);
                     yZT.gameObject.SetActive(true);
-                    ChangeRightContent(tempI);
+                    int index = FindIndexByLayerUnitName(temp.name);
+                    ChangeRightContent(index);
                     middleContent.gameObject.SetActive(false);
                     rightContent.gameObject.SetActive(false);
                     LeftBtnClick(1, false);
@@ -336,6 +337,20 @@ public class YZTLayer : YZTRootLayer
         }
     }
 
+
+    int FindIndexByLayerUnitName(string name) {
+        for (int i = 0; i < GlobalData.layerUnitDatas.Count; i++) {
+            if (GlobalData.layerUnitDatas[i].name == name.Trim()) {
+                return i;
+            }
+        }
+        return -1;
+    }
+
+    //void OnNewPointClick(HotPointData temp,) {
+    
+    //}
+
     async Task InitData() {
         await new WaitUntil(() => {
             return GlobalData.layerUnitDatas.Count > 0;

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.