Kaynağa Gözat

游戏页面的分辨率调整

slambb 2 yıl önce
ebeveyn
işleme
a862f459ad

+ 4 - 3
Assets/BowArrow/Modules/InfraredGuider/InfraredResolution.cs

@@ -12,9 +12,10 @@ public class InfraredResolution : MonoBehaviour
     /// </summary>
     [SerializeField] List<Toggle> ToggleList = new List<Toggle>();
     // Start is called before the first frame update
+    int _index = 0;
     void Start()
     {
-        int _index = 0;
+    
 
         if (InfraredDemo.running) {
             _index = (int)InfraredDemo._ins.resoution.Get();
@@ -43,7 +44,7 @@ public class InfraredResolution : MonoBehaviour
             print("执行你的选中方法:"+ value);
 
             //InfraredDemo._ins.SetResolutionGuider(value);
-
+            _index = value;
         }
 
     }
@@ -54,8 +55,8 @@ public class InfraredResolution : MonoBehaviour
     }
     public void Restart()
     {
+        //存储一次操作数据
         if (InfraredDemo.running) {
-            int _index = (int)InfraredDemo._ins.resoution.Get();
             InfraredDemo._ins.resolutionRestartApp(_index);
         }
       

+ 1 - 1
Assets/SmartBow/Resources/SmartBow/Prefabs/Views/Home/InfraredView.prefab

@@ -1793,7 +1793,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
-  m_AnchoredPosition: {x: 668.5, y: 0}
+  m_AnchoredPosition: {x: 0, y: 0}
   m_SizeDelta: {x: 0, y: 96}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &5651314244108234247