Преглед на файлове

pc 版可能影响的分辨率部分做了限制修改

slambb преди 1 година
родител
ревизия
9cfd629486

+ 10 - 0
Assets/BowArrow/InfraredCamera/InfraredDemo.cs

@@ -145,10 +145,13 @@ public class InfraredDemo : MonoBehaviour
     //public ParamFloatValue saturation = new ParamFloatValue("ic_saturation", 1.0f);
     //public ParamFloatValue contrast = new ParamFloatValue("ic_contrast", 1.0f);
 
+#if UNITY_ANDROID
     //初始化纹理-1280*720,index = 0
     public ParamFloatValue resoution = new ParamFloatValue("ic_resoution2", 0);
     //摄像机分辨率 -320*240,index = 10
     public ParamFloatValue resoutionNew = new ParamFloatValue("ic_resoutionNew", 10);
+#endif
+    
     //抖动过滤值 - 6.0
     public ParamFloatValue shakeFilterValue = new ParamFloatValue("ic_shakeFilterValue2", 6.0f);
     //亮度过滤阈值  - 0.8
@@ -652,8 +655,11 @@ public class InfraredDemo : MonoBehaviour
 
     public void resolutionRestartApp(int index)
     {
+#if UNITY_ANDROID
         SetResolution(index);
         StartCoroutine(RestartOrKillApp());
+#endif
+
     }
     //SetResolution((int)resoution.Get());
 
@@ -663,7 +669,9 @@ public class InfraredDemo : MonoBehaviour
     /// <param name="optionIndex"></param>
     public void SetResolution(int optionIndex)
     {
+#if UNITY_ANDROID
         resoution.Set(optionIndex);
+#endif
         _dropdownResolution.SetValueWithoutNotify(optionIndex);
         switch (optionIndex)
         {
@@ -736,7 +744,9 @@ public class InfraredDemo : MonoBehaviour
 
     public void SetResolutionNew(int optionIndex)
     {
+#if UNITY_ANDROID
         resoutionNew.Set(optionIndex);
+#endif
         _dropdownResolution2.SetValueWithoutNotify(optionIndex);
         switch (optionIndex)
         {

+ 8 - 1
Assets/BowArrow/Modules/InfraredGuider/InfraredGuider.cs

@@ -7,6 +7,7 @@ public class InfraredGuider : MonoBehaviour
 {
     public GameObject infraredLightGuider;
     public GameObject infraredResulutionGuider;
+    public Button resulutionButton;
     //Ïà»ú¸Ð¹â²¿·Ö
     [SerializeField]
     Slider slider;
@@ -21,12 +22,16 @@ public class InfraredGuider : MonoBehaviour
             });
             InfraredDemo._ins.onSetSliderValue(slider);
         }
+
+#if  UNITY_STANDALONE_WIN || UNITY_EDITOR
+        resulutionButton.gameObject.SetActive(false);
+#endif
     }
 
     // Update is called once per frame
     //void Update()
     //{
-        
+
     //}
 
     public void enterLightView() {
@@ -35,7 +40,9 @@ public class InfraredGuider : MonoBehaviour
     }
 
     public void enterInfraredResulutionGuider() {
+#if UNITY_ANDROID
         Instantiate(infraredResulutionGuider);
+#endif
     }
 
     public void ExitGuider() {

+ 1 - 0
Assets/BowArrow/Modules/InfraredGuider/InfraredGuider.prefab

@@ -909,6 +909,7 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   infraredLightGuider: {fileID: 3835120308163295946, guid: a7561ff01df19a34696323b3f2ae8af5, type: 3}
   infraredResulutionGuider: {fileID: 3835120308163295946, guid: 42932db5aedeada47a6b7f34539e1da6, type: 3}
+  resulutionButton: {fileID: 8099165209821351515}
   slider: {fileID: 6932389852952640046}
 --- !u!1 &3958523482832117442
 GameObject:

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

@@ -15,12 +15,13 @@ public class InfraredResolution : MonoBehaviour
     int _index = 0;
     void Start()
     {
-    
-
+#if UNITY_ANDROID
         if (InfraredDemo.running) {
             _index = (int)InfraredDemo._ins.resoution.Get();
         }
-       
+#endif
+
+
         //¸ølist¸³Öµ
         ToggleList = transform.GetComponentsInChildren<Toggle>().ToList();
         //±éÀúToggle GroupϵÄËùÓÐToggle

+ 1 - 1
Assets/InfraredProject/InfraredCamera/Scripts/InfraredCameraHelper.cs

@@ -166,7 +166,7 @@ namespace InfraredManager
             Debug.Log("[InfraredCameraHelper]设置分辨率 SetCameraResolutionNew,width:" + width + " ,height:" + height);
             if (BluetoothWindows.IsWindows())
             {
-                _screenLocate.ResizePC(width, height);
+               // _screenLocate.ResizePC(width, height);
             }
             else {
 

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

@@ -39,7 +39,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: 1266, y: -754}
+  m_AnchoredPosition: {x: 834.03, y: -758}
   m_SizeDelta: {x: 444, y: 96}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &7197677582152048619
@@ -213,7 +213,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: 1266, y: -320}
+  m_AnchoredPosition: {x: 834.03, y: -320}
   m_SizeDelta: {x: 1668.06, y: 640}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &462368352428713268
@@ -368,7 +368,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
   m_AnchoredPosition: {x: 221, y: -48}
-  m_SizeDelta: {x: 280, y: 50}
+  m_SizeDelta: {x: 274.3, y: 50}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &2166458721827678163
 CanvasRenderer:
@@ -1938,6 +1938,8 @@ GameObject:
   serializedVersion: 6
   m_Component:
   - component: {fileID: 6541729197459587817}
+  - component: {fileID: 2474763126871341944}
+  - component: {fileID: 1779181201655389060}
   m_Layer: 5
   m_Name: Layout2
   m_TagString: Untagged
@@ -1964,9 +1966,49 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 1, y: 1}
-  m_AnchoredPosition: {x: 0, y: -100}
-  m_SizeDelta: {x: 0, y: -200}
+  m_AnchoredPosition: {x: 0, y: -15}
+  m_SizeDelta: {x: -863.93994, y: -510.11243}
   m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &2474763126871341944
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 6681263876151103114}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_HorizontalFit: 2
+  m_VerticalFit: 2
+--- !u!114 &1779181201655389060
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 6681263876151103114}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Padding:
+    m_Left: 0
+    m_Right: 0
+    m_Top: 0
+    m_Bottom: 0
+  m_ChildAlignment: 4
+  m_Spacing: 70
+  m_ChildForceExpandWidth: 1
+  m_ChildForceExpandHeight: 1
+  m_ChildControlWidth: 0
+  m_ChildControlHeight: 0
+  m_ChildScaleWidth: 0
+  m_ChildScaleHeight: 0
+  m_ReverseArrangement: 0
 --- !u!1 &8729490037243491096
 GameObject:
   m_ObjectHideFlags: 0

+ 6 - 1
Assets/SmartBow/Scripts/Views/InfraredViewParts/InfraredGuidanceView.cs

@@ -11,8 +11,13 @@ public class InfraredGuidanceView  : JCUnityLib.ViewBase
     // Start is called before the first frame update
     void Start()
     {
-       
 
+#if UNITY_STANDALONE_WIN || UNITY_EDITOR
+        RectTransform rect = layout1.transform as RectTransform;
+        rect.localPosition = new Vector3(0, -100, 0);
+        RectTransform rect2 = layout2.transform as RectTransform;
+        rect2.localPosition = new Vector3(0, -115, 0);
+#endif
     }
 
     public void OnClick_EnterLayout2() {