浏览代码

1.调整ui流程

slambb 11 月之前
父节点
当前提交
f5b5b5a7a6

+ 11 - 3
Assets/BowArrow/InfraredCamera/InfraredDemo.cs

@@ -21,6 +21,8 @@ public class InfraredDemo : JCUnityLib.ViewBase
     RectTransform canvasRectTransform;
 
     public Button mBtnSee;
+    Reporter reporter;
+    public Text FPSText;
     public static void Create()
     {
         if (_ins) return;
@@ -44,17 +46,21 @@ public class InfraredDemo : JCUnityLib.ViewBase
         //直接初始化一次
         _ins.InitInfraredCamera();
 
-        //生成一个控制台
-        UserPlayer.InitLogReporter();
     }
 
 
     void Start()
     {
+        //生成一个控制台
+        GameObject obj = UserPlayer.InitReturnLogReporter() as GameObject;
+        if (obj != null) {
+            reporter = obj.GetComponent<Reporter>();
+        }
+
         if (Application.platform != RuntimePlatform.WindowsEditor) DebugInEditor = false;
         SetVisiable(false);
         InitDebugScreenPoint();
-        gameObject.AddComponent<FPSTester>();
+        // gameObject.AddComponent<FPSTester>();
 
         if (CommonConfig.StandaloneModeOrPlatformB)
         {
@@ -83,6 +89,8 @@ public class InfraredDemo : JCUnityLib.ViewBase
     {
         UpdateInfraredCamera();
         //UpdateDebugScreenPoint();
+
+        if(reporter!=null) FPSText.text = "FPS:" + reporter.fps;
     }
 
     public void OnClick_See()

+ 83 - 1
Assets/BowArrow/InfraredCamera/Resources/InfraredDemo.prefab

@@ -9566,6 +9566,86 @@ RectTransform:
   m_AnchoredPosition: {x: -5, y: 0}
   m_SizeDelta: {x: -20, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
+--- !u!1 &4750271699573982589
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 6904309325072394645}
+  - component: {fileID: 523407382556651653}
+  - component: {fileID: 1286823940906513377}
+  m_Layer: 5
+  m_Name: FPS
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &6904309325072394645
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4750271699573982589}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 1
+  m_Children: []
+  m_Father: {fileID: 7795906586411487646}
+  m_RootOrder: 6
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0, y: 1}
+  m_AnchorMax: {x: 0, y: 1}
+  m_AnchoredPosition: {x: 35, y: -40}
+  m_SizeDelta: {x: 320, y: 60}
+  m_Pivot: {x: 0, y: 1}
+--- !u!222 &523407382556651653
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4750271699573982589}
+  m_CullTransparentMesh: 1
+--- !u!114 &1286823940906513377
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4750271699573982589}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 0, b: 0, a: 1}
+  m_RaycastTarget: 0
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_FontData:
+    m_Font: {fileID: 12800000, guid: 6b6cc7ab59ef00947950b61fdca2d042, type: 3}
+    m_FontSize: 50
+    m_FontStyle: 1
+    m_BestFit: 0
+    m_MinSize: 3
+    m_MaxSize: 64
+    m_Alignment: 3
+    m_AlignByGeometry: 0
+    m_RichText: 1
+    m_HorizontalOverflow: 0
+    m_VerticalOverflow: 1
+    m_LineSpacing: 1
+  m_Text: 'FPS:'
 --- !u!1 &4756057991134712136
 GameObject:
   m_ObjectHideFlags: 0
@@ -11351,6 +11431,7 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   canvasRectTransform: {fileID: 1011583018579085310}
   mBtnSee: {fileID: 8997214623094423509}
+  FPSText: {fileID: 1286823940906513377}
   _cameraRender: {fileID: 622231698153027125}
   _cameraRender2: {fileID: 2746271057098966744}
   _crosshairsInCamera:
@@ -15500,7 +15581,7 @@ RectTransform:
   - {fileID: 4786761868314834373}
   - {fileID: 7610876826090738777}
   m_Father: {fileID: 7795906586411487646}
-  m_RootOrder: 6
+  m_RootOrder: 7
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
@@ -17854,6 +17935,7 @@ RectTransform:
   - {fileID: 5130933070684752473}
   - {fileID: 676106733101602600}
   - {fileID: 6796945967122502882}
+  - {fileID: 6904309325072394645}
   - {fileID: 2836967719346071527}
   m_Father: {fileID: 1011583018579085310}
   m_RootOrder: 3

+ 1 - 1
Assets/BowArrow/Resources/Prefabs/Views/Home/DeviceViewInfrared.prefab

@@ -4241,7 +4241,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &2344157582300514336
 RectTransform:
   m_ObjectHideFlags: 0

+ 6 - 3
Assets/BowArrow/Scripts/Components/TextAutoLanguage2/Resources/TextAutoLanguage2/cn.json

@@ -572,7 +572,8 @@
   "TitleTipMarker-HOUYIPro": "HOUYI Pro瞄准模块",
   "TitleTipMarker-ArtemisPro": "Artemis Pro",
   "TitleTipMarker-M9": "操作M9手枪依次瞄准屏幕的四个角\n扣动扳机进行标记(四角位置标签)",
-  "TitleTipMarker2": "操作瞄准器设备对准电视,按提示依次用红外光点瞄准摄像头中显示区域内白框的四个角,并单击瞄准器的准心键进行标记。\n①  如白框与电视屏幕显示区域位置一致,点击“完成”按键\n②  如标记中发现白框与电视屏幕显示区域差异较大,点击“自动定位”按键,\n重新进行自动识别\n③  如多次自动识别无效后,点击“手动设置”按键,进入手动设置方式",
+  "TitleTipMarker2": "操作瞄准器设备对准电视,按提示依次用红外光点瞄准摄像头中显示区域内白框的四个角,并单击瞄准器的准心键进行标记。\n① 如白框与电视屏幕显示区域位置一致,点击“完成”按键\n② 如标记中发现白框与电视屏幕显示区域差异较大,点击“自动定位”按键,\n重新进行自动识别\n③ 如多次自动识别无效后,点击“手动设置”按键,进入手动设置方式",
+ 
   "TipMiddle": "请标记:{0}角的点",
   "TipTopLeft": "左上",
   "TipTopRight": "右上",
@@ -581,8 +582,10 @@
   "TipMarkComplete": "标记完成!",
   "TipMarkerError": "定位失败,需按要求重新标记。",
   "TipQuadError": "定位失败,不是有效的四边形。",
-  "TipAutoEnd": "①如无法识别出屏幕,需屏蔽环境干扰光源后,点击“自动定位”按键重新识别\n②如多次无法识别出屏幕,说明屏幕亮度不足,点击“环境测光”按键,通过屏幕标记或手动设置对屏幕进行手动标记",
-  "TipLightCtrl": "①操作设备对准电视,将瞄准器的红外光点位于梯形框内的电视屏幕,红色十字会在光点上,并随光点移动;如没有,需要找出干扰光源关闭它或调小亮度和对比度\n②如多次设置,仍无法实现红色十字随光点移动,点击“手动设置”按键,进入手动设置方式",
+  "TipAutoEnd": "① 如无法识别出屏幕,需屏蔽环境干扰光源后,点击“自动定位”按键重新识别\n② 如多次无法识别出屏幕,说明屏幕亮度不足,点击“环境测光”按键,通过屏幕标记或手动设置对屏幕进行手动标记",
+  "TipAutoEndHas": "① 如无法识别出屏幕,需屏蔽环境干扰光源后,点击“自动定位”按键重新识别\n② 如白框与电视屏幕显示区域位置一致,点击“确认”按键,跳过定位流程\n③ 如白框与电视屏幕显示区域位置不一致,点击“环境测光”按键,继续定位流程",
+  "TipLightCtrl": "① 操作设备对准电视,将瞄准器的红外光点位于梯形框内的电视屏幕,红色十字会在光点上,并随光点移动,点击“屏幕标记”按键进行标记\n② 如红色十字没有随光点移动,需要找出干扰光源关闭它或调小亮度和对比度\n③ 如多次设置,仍无法实现红色十字随光点移动,点击“手动设置”按键,进入手动设置方式",
+  "TipLightCtrlHas": "操作设备对准电视,将瞄准器的红外光点位于梯形框内的电视屏幕,红色十字会在光点上,并随光点移动;如没有,需要找出干扰光源关闭它或调小亮度和对比度",
 
   "ScreenPositioningSuccessful-title": "\u3000\u3000请用手指点击选择最合适的屏幕区域结果。如未发现明显差异,请任选其一。如识别到的屏幕区域不合适,请返回到相应界面进行重新识别。",
   "FirstResult": "结果一",

+ 6 - 2
Assets/BowArrow/Scripts/Components/TextAutoLanguage2/Resources/TextAutoLanguage2/en.json

@@ -623,6 +623,7 @@
   "TitleTipMarker-ArtemisPro": "Artemis Pro",
   "TitleTipMarker-M9": "Operate M9 pistol to aim at the four corners of the screen \nin sequence, pull the trigger to mark (four corner position label)",
   "TitleTipMarker2": "Operate the aiming device to face the TV, and follow the instructions to aim the infrared light dot at the four corners of the white frame within the displayed area on the camera. Press the crosshair button on the aiming device to mark each corner.\n① If the white frame matches the TV screen's display area, click the 'Finish' button.\n② If there is a significant difference between the white frame and the TV screen's display area during marking, click the 'Auto Positioning' button to retry automatic detection.\n③ If multiple automatic detections fail, click the 'Manual Setup' button to enter manual setup mode.",
+ 
   "TipMiddle": "Please mark: Point at the {0} corner",
   "TipTopLeft": "Top-Left",
   "TipTopRight": "Top-Right",
@@ -631,8 +632,11 @@
   "TipMarkComplete": "Mark Complete!",
   "TipMarkerError": "Positioning failed. You need to re-mark as instructed.",
   "TipQuadError": "Positioning failed. The shape is not a valid quadrilateral.",
-  "TipAutoEnd": "①If the screen cannot be detected, eliminate any ambient light interference and click the 'Auto Positioning' button to retry detection.\n②If the screen cannot be detected multiple times, it indicates insufficient screen brightness. Click the 'Ambient Light Measurement' button to manually mark the screen using screen marking or manual setup.",
-  "TipLightCtrl": "①Position the device facing the TV, and ensure the infrared light dot from the aiming device is within the TV screen inside the trapezoidal frame. A red cross should appear on the light dot and move with it. If not, identify and eliminate any interfering light sources or reduce the brightness and contrast.\n②If, after multiple attempts, the red cross still does not move with the light dot, click the 'Manual Setup' button to enter manual setup mode.",
+  "TipAutoEnd": "① If the screen cannot be detected, eliminate any ambient light interference and click the 'Auto Positioning' button to retry detection.\n② If the screen cannot be detected multiple times, it indicates insufficient screen brightness. Click the 'Ambient Light Measurement' button to manually mark the screen using screen marking or manual setup.",
+  "TipAutoEndHas": "① If the screen cannot be detected, eliminate any ambient light interference and click the 'Auto Positioning' button to retry detection.\n② If the white frame matches the TV screen's display area, click the 'Confirm' button to skip the positioning process.\n③ If the white frame does not match the TV screen's display area, click the 'Ambient Light Measurement' button to continue the positioning process.",
+
+  "TipLightCtrl": "① Position the device facing the TV, ensuring the infrared light dot from the aiming device is within the trapezoidal frame on the TV screen. The red cross should appear on the light dot and move with it. Click the 'Screen Marking' button to mark.\n② If the red cross does not move with the light dot, identify and eliminate any interfering light sources or reduce the brightness and contrast.\n③ If, after multiple adjustments, the red cross still does not move with the light dot, click the 'Manual Setup' button to enter manual setup mode.",
+  "TipLightCtrlHas": "Position the device facing the TV, ensuring the infrared light dot from the aiming device is within the TV screen inside the trapezoidal frame. A red cross should appear on the light dot and move with it. If not, identify and eliminate any interfering light sources or reduce the brightness and contrast.",
 
   "ScreenPositioningSuccessful-title": "\u3000\u3000Please use your finger to select the most suitable screen area result. If no significant difference is found, choose any one. If the detected screen area is not suitable, return to the corresponding interface for re-detection.",
   "FirstResult": "First Result",

+ 10 - 2
Assets/BowArrow/Scripts/Network/UserPlayer.cs

@@ -207,8 +207,16 @@ public class UserPlayer : JCEntity
         Object.Instantiate(Resources.Load("Prefabs/LogReporter"));
         Debug.LogWarning("在屏幕上画个圈即可打开控制台");
         Debug.Log("app-version: " + Resources.Load<TextAsset>("app-version").text);
-    } 
-
+    }
+    public static Object InitReturnLogReporter()
+    {
+        if (s_LogReporterInited) return null;
+        s_LogReporterInited = true;
+        Object o = Object.Instantiate(Resources.Load("Prefabs/LogReporter"));
+        Debug.LogWarning("在屏幕上画个圈即可打开控制台");
+        Debug.Log("app-version: " + Resources.Load<TextAsset>("app-version").text);
+        return o;
+    }
     private static void handleAuthExpire()
     {
         //tip

+ 18 - 8
Assets/BowArrow/Scripts/View/Home/DeviceViewInfrared.cs

@@ -135,18 +135,28 @@ public class DeviceViewInfrared : JCUnityLib.ViewBase, MenuBackInterface
                 if (!Connect1Parent.activeSelf) Connect1Parent.SetActive(true);
                 if (Connect2Parent.activeSelf) Connect2Parent.SetActive(false);
             }
-            //2p 按钮 ,两个同时蓝牙连接后。隐藏
-            if (deviceViewItems[1].gameObject.activeSelf || deviceViewItems[0].getBLEConnectState() && deviceViewItems[1].getBLEConnectState())
+            if (!selectDeviceViewItem.bInfraredDevices())
             {
-                if (smartConnect2Buttons[3].gameObject.activeSelf) {
-                    smartConnect2Buttons[3].gameObject.SetActive(false);
+                //2p 按钮 ,两个同时蓝牙连接后。隐藏
+                if (deviceViewItems[1].gameObject.activeSelf || deviceViewItems[0].getBLEConnectState() && deviceViewItems[1].getBLEConnectState())
+                {
+                    if (smartConnect2Buttons[3].gameObject.activeSelf)
+                    {
+                        smartConnect2Buttons[3].gameObject.SetActive(false);
+                    }
+                }
+                else if (!smartConnect2Buttons[3].gameObject.activeSelf)
+                {
+                    smartConnect2Buttons[3].gameObject.SetActive(true);
                 }
             }
-            else if(!smartConnect2Buttons[3].gameObject.activeSelf)
-            {
-                smartConnect2Buttons[3].gameObject.SetActive(true);
+            else {
+                //todo 红外设备暂时隐藏2p
+                if (smartConnect2Buttons[3].gameObject.activeSelf)
+                {
+                    smartConnect2Buttons[3].gameObject.SetActive(false);
+                }
             }
-          
         }
     }
 

+ 32 - 0
Assets/BowArrow/Scripts/View/Home/DeviceView_ItemShow.cs

@@ -535,4 +535,36 @@ public class DeviceView_ItemShow : MonoBehaviour
     {
         return selectPanel.enabled && bShowInfo;
     }
+
+    /// <summary>
+    /// ÅжÏÊDz»ÊǺìÍâÉ豸
+    /// </summary>
+    /// <returns></returns>
+    public bool bInfraredDevices() {
+        bool bInfrared = false;
+        List<AimDeviceInfo> allDeviceInfo = AimHandler.ins.aimDeviceInfos.arry;
+        AimDeviceInfo aimDeviceInfo = allDeviceInfo.Find(obj => obj.id == deviceIndex);
+        if (aimDeviceInfo == null || aimDeviceInfo.type == -1 || !aimDeviceInfo.bInitMac)//AimHandler.ins.aimDeviceInfos.arry.Count <= deviceIndex
+        {
+            return bInfrared;
+        }
+        switch ((AimDeviceType)aimDeviceInfo.type)
+        {
+            case AimDeviceType.HOUYI:
+            case AimDeviceType.HOUYI2:
+            case AimDeviceType.ARTEMIS:
+                bInfrared = false;
+                break;
+            case AimDeviceType.HOUYIPRO:
+            case AimDeviceType.Gun:
+            case AimDeviceType.ARTEMISPRO:
+                bInfrared = true;
+                break;
+
+            default:
+                bInfrared = false;
+                break;
+        }
+        return bInfrared;
+    }
 }

+ 214 - 7
Assets/SmartBow/Resources/SmartBow/Prefabs/Views/Home/InfraredScreenPositioningView.prefab

@@ -1448,6 +1448,7 @@ RectTransform:
   m_ConstrainProportionsScale: 0
   m_Children:
   - {fileID: 8557267620989180314}
+  - {fileID: 2333071390874926840}
   m_Father: {fileID: 4423893524894772476}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -2953,12 +2954,19 @@ MonoBehaviour:
   BottomConfirmBtn: {fileID: 3702552092599838165}
   LayoutAutoEnd: {fileID: 264195977536334739}
   AutoEndConfirmBtn: {fileID: 994305514425658195}
+  TipAutoEnd: {fileID: 1325068315848368893}
+  TipAutoEndHas: {fileID: 2845380691329673789}
   LayoutLightCtrl: {fileID: 6619217424693250322}
   sliderContrast: {fileID: 445937460444285362}
   sliderBrightness: {fileID: 236129132674385549}
+  TipLightCtrl: {fileID: 1938401580927603619}
+  LightCtrlManualButton: {fileID: 2826849913862208130}
+  TipLightCtrlHas: {fileID: 3653660082950717203}
+  LightCtrlReturnButton: {fileID: 8388084543296419793}
   LayoutMarker: {fileID: 1587889050510288302}
   crosshairSmall: {fileID: 4060893055567468929}
   markerTextAutoLanguage2: {fileID: 6358852571920578420}
+  TextTipMarker: {fileID: 2379855393249115299}
   markerPointsParent: {fileID: 6533735888451191301}
   markerPosList:
   - {fileID: 6609255872851191401}
@@ -4126,7 +4134,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &8557267620989180314
 RectTransform:
   m_ObjectHideFlags: 0
@@ -5194,7 +5202,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &416385371414963654
 RectTransform:
   m_ObjectHideFlags: 0
@@ -5256,7 +5264,7 @@ MonoBehaviour:
     m_HorizontalOverflow: 0
     m_VerticalOverflow: 1
     m_LineSpacing: 1.2
-  m_Text: "\u2460\u3000\u64CD\u4F5C\u8BBE\u5907\u5BF9\u51C6\u7535\u89C6\uFF0C\u5C06\u7784\u51C6\u5668\u7684\u7EA2\u5916\u5149\u70B9\u4F4D\u4E8E\u68AF\u5F62\u6846\u5185\u7684\u7535\u89C6\u5C4F\u5E55\uFF0C\u7EA2\u8272\u5341\u5B57\u4F1A\u5728\u5149\u70B9\u4E0A\uFF0C\u5E76\u968F\u5149\u70B9\u79FB\u52A8\uFF1B\u5982\u6CA1\u6709\uFF0C\u9700\u8981\u627E\u51FA\u5E72\u6270\u5149\u6E90\u5173\u95ED\u5B83\u6216\u8C03\u5C0F\u4EAE\u5EA6\u548C\u5BF9\u6BD4\u5EA6\r\n\u2461\u3000\u5982\u591A\u6B21\u8BBE\u7F6E\uFF0C\u4ECD\u65E0\u6CD5\u5B9E\u73B0\u7EA2\u8272\u5341\u5B57\u968F\u5149\u70B9\u79FB\u52A8\uFF0C\u70B9\u51FB\u201C\u624B\u52A8\u8BBE\u7F6E\u201D\u6309\u952E\uFF0C\u8FDB\u5165\u624B\u52A8\u8BBE\u7F6E\u65B9\u5F0F"
+  m_Text: "\u2460\u3000\u64CD\u4F5C\u8BBE\u5907\u5BF9\u51C6\u7535\u89C6\uFF0C\u5C06\u7784\u51C6\u5668\u7684\u7EA2\u5916\u5149\u70B9\u4F4D\u4E8E\u68AF\u5F62\u6846\u5185\u7684\u7535\u89C6\u5C4F\u5E55\uFF0C\u7EA2\u8272\u5341\u5B57\u4F1A\u5728\u5149\u70B9\u4E0A\uFF0C\u5E76\u968F\u5149\u70B9\u79FB\u52A8\uFF0C\u70B9\u51FB\u201C\u5C4F\u5E55\u6807\u8BB0\u201D\u6309\u952E\u8FDB\u884C\u6807\u8BB0\n\u2461\u3000\u5982\u7EA2\u8272\u5341\u5B57\u6CA1\u6709\u968F\u5149\u70B9\u79FB\u52A8\uFF0C\u9700\u8981\u627E\u51FA\u5E72\u6270\u5149\u6E90\u5173\u95ED\u5B83\u6216\u8C03\u5C0F\u4EAE\u5EA6\u548C\u5BF9\u6BD4\u5EA6\n\u2462\u3000\u5982\u591A\u6B21\u8BBE\u7F6E\uFF0C\u4ECD\u65E0\u6CD5\u5B9E\u73B0\u7EA2\u8272\u5341\u5B57\u968F\u5149\u70B9\u79FB\u52A8\uFF0C\u70B9\u51FB\u201C\u624B\u52A8\u8BBE\u7F6E\u201D\u6309\u952E\uFF0C\u8FDB\u5165\u624B\u52A8\u8BBE\u7F6E\u65B9\u5F0F"
 --- !u!114 &5012688958417105386
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -6033,7 +6041,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &1091291821683212642
 RectTransform:
   m_ObjectHideFlags: 0
@@ -6876,6 +6884,105 @@ MonoBehaviour:
   m_OnValueChanged:
     m_PersistentCalls:
       m_Calls: []
+--- !u!1 &2845380691329673789
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 2333071390874926840}
+  - component: {fileID: 7030569663538377681}
+  - component: {fileID: 2806313827658064790}
+  - component: {fileID: 2621477654424332911}
+  m_Layer: 5
+  m_Name: TipAutoEndHas
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 0
+--- !u!224 &2333071390874926840
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2845380691329673789}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 593041796886004395}
+  m_RootOrder: 1
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0.5, y: 0.5}
+  m_AnchorMax: {x: 0.5, y: 0.5}
+  m_AnchoredPosition: {x: 0, y: -40}
+  m_SizeDelta: {x: 1420, y: 272.3826}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &7030569663538377681
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2845380691329673789}
+  m_CullTransparentMesh: 1
+--- !u!114 &2806313827658064790
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2845380691329673789}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 0
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_FontData:
+    m_Font: {fileID: 12800000, guid: 6b6cc7ab59ef00947950b61fdca2d042, type: 3}
+    m_FontSize: 40
+    m_FontStyle: 1
+    m_BestFit: 0
+    m_MinSize: 0
+    m_MaxSize: 53
+    m_Alignment: 0
+    m_AlignByGeometry: 0
+    m_RichText: 1
+    m_HorizontalOverflow: 0
+    m_VerticalOverflow: 1
+    m_LineSpacing: 1.2
+  m_Text: "\u2460\u5982\u65E0\u6CD5\u8BC6\u522B\u51FA\u5C4F\u5E55\uFF0C\u9700\u5C4F\u853D\u73AF\u5883\u5E72\u6270\u5149\u6E90\u540E\uFF0C\u70B9\u51FB\u201C\u81EA\u52A8\u5B9A\u4F4D\u201D\u6309\u952E\u91CD\u65B0\u8BC6\u522B\t\r\n\u2461\u5982\u767D\u6846\u4E0E\u7535\u89C6\u5C4F\u5E55\u663E\u793A\u533A\u57DF\u4F4D\u7F6E\u4E00\u81F4\uFF0C\u70B9\u51FB\u201C\u786E\u8BA4\u201D\u6309\u952E\uFF0C\u8DF3\u8FC7\u5B9A\u4F4D\u6D41\u7A0B\r\n\u2462\u5982\u767D\u6846\u4E0E\u7535\u89C6\u5C4F\u5E55\u663E\u793A\u533A\u57DF\u4F4D\u7F6E\u4E0D\u4E00\u81F4\uFF0C\u70B9\u51FB\u201C\u73AF\u5883\u6D4B\u5149\u201D\u6309\u952E\uFF0C\u7EE7\u7EED\u5B9A\u4F4D\u6D41\u7A0B"
+--- !u!114 &2621477654424332911
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2845380691329673789}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 0f4efe98aab6c6b41a7ee1f4c49df27b, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  textKey: TipAutoEndHas
+  layoutRebuildObject: {fileID: 0}
+  languageFontSizes:
+  - language: 1
+    fontSize: 35
+    lineSpacing: 1.1
 --- !u!1 &2848905914134633484
 GameObject:
   m_ObjectHideFlags: 0
@@ -8622,6 +8729,105 @@ MonoBehaviour:
     y: 0
     width: 1
     height: 1
+--- !u!1 &3653660082950717203
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 4961716356448621260}
+  - component: {fileID: 8627755538490981808}
+  - component: {fileID: 5232962279529387866}
+  - component: {fileID: 7656773077549282830}
+  m_Layer: 5
+  m_Name: TipLightCtrlHas
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 0
+--- !u!224 &4961716356448621260
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3653660082950717203}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 3654426116446791840}
+  m_RootOrder: 1
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0.5, y: 0.5}
+  m_AnchorMax: {x: 0.5, y: 0.5}
+  m_AnchoredPosition: {x: 0, y: -40}
+  m_SizeDelta: {x: 1450, y: 272.3826}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &8627755538490981808
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3653660082950717203}
+  m_CullTransparentMesh: 1
+--- !u!114 &5232962279529387866
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3653660082950717203}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 0
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_FontData:
+    m_Font: {fileID: 12800000, guid: 6b6cc7ab59ef00947950b61fdca2d042, type: 3}
+    m_FontSize: 40
+    m_FontStyle: 1
+    m_BestFit: 0
+    m_MinSize: 0
+    m_MaxSize: 53
+    m_Alignment: 0
+    m_AlignByGeometry: 0
+    m_RichText: 1
+    m_HorizontalOverflow: 0
+    m_VerticalOverflow: 1
+    m_LineSpacing: 1.2
+  m_Text: "\u64CD\u4F5C\u8BBE\u5907\u5BF9\u51C6\u7535\u89C6\uFF0C\u5C06\u7784\u51C6\u5668\u7684\u7EA2\u5916\u5149\u70B9\u4F4D\u4E8E\u68AF\u5F62\u6846\u5185\u7684\u7535\u89C6\u5C4F\u5E55\uFF0C\u7EA2\u8272\u5341\u5B57\u4F1A\u5728\u5149\u70B9\u4E0A\uFF0C\u5E76\u968F\u5149\u70B9\u79FB\u52A8\uFF1B\u5982\u6CA1\u6709\uFF0C\u9700\u8981\u627E\u51FA\u5E72\u6270\u5149\u6E90\u5173\u95ED\u5B83\u6216\u8C03\u5C0F\u4EAE\u5EA6\u548C\u5BF9\u6BD4\u5EA6"
+--- !u!114 &7656773077549282830
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3653660082950717203}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 0f4efe98aab6c6b41a7ee1f4c49df27b, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  textKey: TipLightCtrlHas
+  layoutRebuildObject: {fileID: 0}
+  languageFontSizes:
+  - language: 1
+    fontSize: 32
+    lineSpacing: 0
 --- !u!1 &3702552092599838165
 GameObject:
   m_ObjectHideFlags: 0
@@ -9589,7 +9795,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: 446.76, y: -362.5}
+  m_AnchoredPosition: {x: 446.76, y: -66.5}
   m_SizeDelta: {x: 1450, y: 85}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &7700196897521753072
@@ -9778,7 +9984,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &4863671655275579077
 RectTransform:
   m_ObjectHideFlags: 0
@@ -10856,6 +11062,7 @@ RectTransform:
   m_ConstrainProportionsScale: 0
   m_Children:
   - {fileID: 416385371414963654}
+  - {fileID: 4961716356448621260}
   m_Father: {fileID: 2385600522496170982}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -17675,7 +17882,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: 242.84503, y: -88.1}
+  m_AnchoredPosition: {x: 580.145, y: -88.1}
   m_SizeDelta: {x: 420, y: 137}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &4890893490615340598

+ 104 - 2
Assets/SmartBow/Scripts/Views/InfraredViewParts/InfraredScreenPositioningView.cs

@@ -110,6 +110,12 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
     [SerializeField]
     GameObject LayoutAutoEnd;
     [SerializeField] Button AutoEndConfirmBtn;
+    [Tooltip("没有存在校准数据时候显示")]
+    [SerializeField]
+    GameObject TipAutoEnd;
+    [Tooltip("存在校准数据时候显示")]
+    [SerializeField]
+    GameObject TipAutoEndHas;
 
     [Header("LightCtrl Layout Group")]
     [SerializeField]
@@ -117,6 +123,14 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
     [SerializeField] Slider sliderContrast;
     //亮度
     [SerializeField] Slider sliderBrightness;
+    [Tooltip("没有存在校准数据时候显示")]
+    [SerializeField]
+    GameObject TipLightCtrl;
+    [SerializeField] Button LightCtrlManualButton;
+    [Tooltip("存在校准数据时候显示")]
+    [SerializeField]
+    GameObject TipLightCtrlHas;
+    [SerializeField] Button LightCtrlReturnButton;
 
     [Header("Marker Layout Group")]
     [SerializeField]
@@ -125,6 +139,10 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
     RectTransform crosshairSmall;
     [Tooltip("标记页面标题提示")]
     [SerializeField] TextAutoLanguage2 markerTextAutoLanguage2;
+    [Tooltip("存在校准数据时候显示")]
+    [SerializeField]
+    GameObject TextTipMarker;
+
     [SerializeField]
     RectTransform markerPointsParent;
     [SerializeField]
@@ -454,6 +472,7 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
     {
         curStepView = step;
         AllScreenPositioningStepFalse();
+        QuadrilateralInCamera screenAuto = ScreenLocate.Main.ScreenIdentification.QuadAuto;
         switch (step)
         {
             case ScreenPositioningStep.Start:
@@ -466,15 +485,19 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
                 LayoutAutoEnd.SetActive(true);
                 pointsParent.gameObject.SetActive(false);
                 CurrentUILineGenerator.enabled = true;
-                QuadrilateralInCamera screenAuto = ScreenLocate.Main.ScreenIdentification.QuadAuto;
                 if (screenAuto == null)
                 {
+                    //不存在数据,走流程2
                     AutoEndConfirmBtn.interactable = false;
+                    TipAutoEndHas.SetActive(false);
+                    TipAutoEnd.SetActive(true);
                 }
                 else
                 {
                     //存在数据,显示确认按钮
                     AutoEndConfirmBtn.interactable = true;
+                    TipAutoEndHas.SetActive(true);
+                    TipAutoEnd.SetActive(false);
                 }
                 break;
             case ScreenPositioningStep.LightCtrl:
@@ -483,6 +506,22 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
                 CurrentUILineGenerator.enabled = true;
                 pointsParent.gameObject.SetActive(false);
                 //setPointsLocation(ScreenLocate.quadUnityVectorList, pointsParent.gameObject, true);
+                if (screenAuto == null)
+                {
+                    //不存在数据,走流程2
+                    TipLightCtrlHas.SetActive(false);
+                    TipLightCtrl.SetActive(true);
+                    LightCtrlReturnButton.gameObject.SetActive(false);
+                    LightCtrlManualButton.gameObject.SetActive(true);
+                }
+                else
+                {
+                    //存在数据
+                    TipLightCtrlHas.SetActive(true);
+                    TipLightCtrl.SetActive(false);
+                    LightCtrlReturnButton.gameObject.SetActive(true);
+                    LightCtrlManualButton.gameObject.SetActive(false);
+                }
                 break;
             case ScreenPositioningStep.Marker:
                 //显示提示
@@ -493,8 +532,14 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
                 LayoutMarker.SetActive(true);
                 CurrentUILineGenerator.enabled = false;
                 pointsParent.gameObject.SetActive(false);
-                SyncQuadUnityVectorListToMarkerPointesPos();
                 //setPointsLocation(ScreenLocate.quadUnityVectorList, pointsParent.gameObject, true);
+                SyncQuadUnityVectorListToMarkerPointesPos();
+                TextTipMarker.SetActive(true);
+
+                if (screenAuto == null)
+                {
+                    ResetMarkerPointesPos();
+                }
                 break;
             case ScreenPositioningStep.Manual:
                 maskLine.SetDrawMask(true);
@@ -506,6 +551,12 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
                 doLocateAuto = false;
                 draggableParent.gameObject.SetActive(true);
                 pointsParent.gameObject.SetActive(false);
+
+                if (screenAuto == null)
+                {
+                    //不存在数据
+                    onResetByMaskLine();
+                }
                 break;
          
             case ScreenPositioningStep.Successful:
@@ -524,6 +575,7 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
         LayoutAutoEnd.SetActive(false);
         LayoutLightCtrl.SetActive(false);
         LayoutSuccessful.SetActive(false);
+        onClearSuccessfullLineGenerator();
     }
     /// <summary>
     /// 开始页面时候ui
@@ -975,6 +1027,21 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
         }
     }
     /// <summary>
+    /// 根据MaskLine 重置 可拖拽的 line 部分数据
+    /// </summary>
+    public void onResetByMaskLine()
+    {
+        oldLinePosition.Clear();
+
+        List<Vector2> _markLine = maskLine.ScreenPositions;
+        pos1.anchoredPosition = _markLine[0];//Bottom Left
+        pos2.anchoredPosition = _markLine[1]; //Bottom Right
+        pos3.anchoredPosition = _markLine[2]; //Top Right
+        pos4.anchoredPosition = _markLine[3];//Top Left
+        //设置一次位置
+        SetLinePos();
+    }
+    /// <summary>
     /// 标准四个点
     /// </summary>
     /// <param name="index"></param>
@@ -1672,6 +1739,41 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
         }
  
     }
+    /// <summary>
+    /// 绘制线
+    /// </summary>
+    /// <param name="screenPositions"></param>
+    void SetMarkerPointesPos(List<Vector2> screenPositions)
+    {
+        Debug.Log("[ScreenLocate] SetMarkerPointesPos :");
+        markerPosList[0].anchoredPosition = screenPositions[0];
+        markerPosList[1].anchoredPosition = screenPositions[1];
+        markerPosList[2].anchoredPosition = screenPositions[2];
+        markerPosList[3].anchoredPosition = screenPositions[3];
+        SetMarkerRectanglePoints(linePosConversion(markerPosList[0].localPosition, markerPosList[1].localPosition, markerPosList[2].localPosition, markerPosList[3].localPosition));
+
+    }
+    /// <summary>
+    /// 重置marker 绘线框
+    /// </summary>
+    void ResetMarkerPointesPos()
+    {
+        Debug.Log("[ScreenLocate] ResetMarkerPointesPos :");
+        // 获取屏幕的四个角的像素坐标
+        Vector2 bottomLeft = new Vector2(0, 0);
+        // 将屏幕像素坐标转换为 Canvas 的局部坐标
+        Vector2 localBottomLeft;
+        RectTransformUtility.ScreenPointToLocalPointInRectangle(canvasRectTransform, bottomLeft, null, out localBottomLeft);
+        int _x = Mathf.FloorToInt(Mathf.Abs(localBottomLeft.x)), _y = Mathf.FloorToInt(Mathf.Abs(localBottomLeft.y));
+        markerPosList[0].anchoredPosition = new Vector3(-_x, -_y, 0); //Bottom Left
+        markerPosList[1].anchoredPosition = new Vector3(_x, -_y, 0); //Bottom Right
+        markerPosList[2].anchoredPosition = new Vector3(_x, _y, 0);  //Top Right
+        markerPosList[3].anchoredPosition = new Vector3(-_x, _y, 0); //Top Left
+        SetMarkerRectanglePoints(linePosConversion(markerPosList[0].localPosition, markerPosList[1].localPosition, markerPosList[2].localPosition, markerPosList[3].localPosition));
+
+    }
+   
+
     void SetMarkerRectanglePoints(List<Vector2> screenPositions)
     {
         markerPointsLine.SetLine(screenPositions);