diff --git a/Assets/Res/ui/common/高斯模糊.mat b/Assets/Res/ui/common/高斯模糊.mat new file mode 100644 index 0000000..cc3acb5 --- /dev/null +++ b/Assets/Res/ui/common/高斯模糊.mat @@ -0,0 +1,85 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: "\u9AD8\u65AF\u6A21\u7CCA" + m_Shader: {fileID: 4800000, guid: 2777693b621900141a534bddd40419ef, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _BumpAmt: 14 + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _Size: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0.4056604, g: 0.4056604, b: 0.4056604, a: 0.972549} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Res/ui/common/高斯模糊.mat.meta b/Assets/Res/ui/common/高斯模糊.mat.meta new file mode 100644 index 0000000..c59f503 --- /dev/null +++ b/Assets/Res/ui/common/高斯模糊.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cb8235f26ce805647bf4328b64227c7f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Res/ui/homepage/homePage.prefab b/Assets/Res/ui/homepage/homePage.prefab index 2b0578c..c848902 100644 --- a/Assets/Res/ui/homepage/homePage.prefab +++ b/Assets/Res/ui/homepage/homePage.prefab @@ -360,9 +360,9 @@ RectTransform: m_Children: [] m_Father: {fileID: 4568515400396789170} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 55, y: -20} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 40} m_Pivot: {x: 0, y: 0.5} --- !u!222 &244985182926712396 @@ -5959,10 +5959,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 1846093831662304367} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 120, y: 10} - m_SizeDelta: {x: 36, y: 45} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 45} m_Pivot: {x: 0.5, y: 1} --- !u!222 &3749378162026232689 CanvasRenderer: @@ -6300,10 +6300,10 @@ RectTransform: - {fileID: 4929160862756643459} m_Father: {fileID: 1069437048745146005} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 6, y: -35.5} - m_SizeDelta: {x: 155.5, y: 60} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 60} m_Pivot: {x: 0, y: 0.5} --- !u!222 &6545400438610870076 CanvasRenderer: @@ -8269,10 +8269,10 @@ RectTransform: - {fileID: 327602628975355249} m_Father: {fileID: 1069437048745146005} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 472.5, y: -35.5} - m_SizeDelta: {x: 155.5, y: 60} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 60} m_Pivot: {x: 0, y: 0.5} --- !u!222 &1430460842267038712 CanvasRenderer: @@ -9325,10 +9325,10 @@ RectTransform: - {fileID: 1666632072748462393} m_Father: {fileID: 3113186033587881318} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 79.875, y: -55.5} - m_SizeDelta: {x: 159.75, y: 111} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 111} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1208559727036824385 CanvasRenderer: @@ -9926,10 +9926,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 4568515400396789170} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 20, y: -20} - m_SizeDelta: {x: 40, y: 40} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 40} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &5333284508431453442 CanvasRenderer: @@ -10765,10 +10765,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 4568515400396789170} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 70, y: -20} - m_SizeDelta: {x: 36, y: 36} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 36} m_Pivot: {x: 0, y: 0.5} --- !u!222 &2163933620157744377 CanvasRenderer: @@ -12331,10 +12331,10 @@ RectTransform: - {fileID: 2975297560480716843} m_Father: {fileID: 1069437048745146005} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 317, y: -35.5} - m_SizeDelta: {x: 155.5, y: 60} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 60} m_Pivot: {x: 0, y: 0.5} --- !u!222 &1781978324875051918 CanvasRenderer: @@ -13199,10 +13199,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 1846093831662304367} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 51, y: 10} - m_SizeDelta: {x: 102, y: 45} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 45} m_Pivot: {x: 0.5, y: 1} --- !u!222 &1255502245993973393 CanvasRenderer: @@ -14574,10 +14574,10 @@ RectTransform: - {fileID: 6020472513220436764} m_Father: {fileID: 1069437048745146005} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 161.5, y: -35.5} - m_SizeDelta: {x: 155.5, y: 60} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 60} m_Pivot: {x: 0, y: 0.5} --- !u!222 &7222490346232352863 CanvasRenderer: @@ -15413,10 +15413,10 @@ RectTransform: - {fileID: 3973224289061388720} m_Father: {fileID: 3113186033587881318} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 256.625, y: -55.5} - m_SizeDelta: {x: 159.75, y: 111} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 111} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &5747587932164273453 CanvasRenderer: @@ -17123,7 +17123,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &7190469845234229913 RectTransform: m_ObjectHideFlags: 0 @@ -17939,10 +17939,10 @@ RectTransform: - {fileID: 4828275562546024043} m_Father: {fileID: 3113186033587881318} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 433.375, y: -55.5} - m_SizeDelta: {x: 159.75, y: 111} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 111} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &2323428145332649792 CanvasRenderer: @@ -19937,10 +19937,10 @@ RectTransform: - {fileID: 1538898088399718538} m_Father: {fileID: 3113186033587881318} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 610.125, y: -55.5} - m_SizeDelta: {x: 159.75, y: 111} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 111} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &4295980959046441324 CanvasRenderer: diff --git a/Assets/Res/ui/selfpage/设备教学-中文.prefab b/Assets/Res/ui/selfpage/设备教学-中文.prefab index 21f83f3..c1f9c63 100644 --- a/Assets/Res/ui/selfpage/设备教学-中文.prefab +++ b/Assets/Res/ui/selfpage/设备教学-中文.prefab @@ -303,8 +303,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 138.5, y: 0} - m_SizeDelta: {x: -257, y: 200} + m_AnchoredPosition: {x: 133.5, y: 0} + m_SizeDelta: {x: -267, y: 200} m_Pivot: {x: 0.5, y: 1} --- !u!222 &2355018124152107698 CanvasRenderer: @@ -382,8 +382,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 138.5, y: 0} - m_SizeDelta: {x: -257, y: 200} + m_AnchoredPosition: {x: 133.5, y: 0} + m_SizeDelta: {x: -267, y: 200} m_Pivot: {x: 0.5, y: 1} --- !u!222 &2891021194965888160 CanvasRenderer: @@ -1238,8 +1238,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 138.5, y: 0} - m_SizeDelta: {x: -257, y: 200} + m_AnchoredPosition: {x: 133.5, y: 0} + m_SizeDelta: {x: -267, y: 200} m_Pivot: {x: 0.5, y: 1} --- !u!222 &3329066133400554971 CanvasRenderer: @@ -1514,8 +1514,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 138.5, y: 0} - m_SizeDelta: {x: -257, y: 200} + m_AnchoredPosition: {x: 133.5, y: 0} + m_SizeDelta: {x: -267, y: 200} m_Pivot: {x: 0.5, y: 1} --- !u!222 &4915385673556583877 CanvasRenderer: @@ -2807,8 +2807,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 138.5, y: 0} - m_SizeDelta: {x: -257, y: 200} + m_AnchoredPosition: {x: 133.5, y: 0} + m_SizeDelta: {x: -267, y: 200} m_Pivot: {x: 0.5, y: 1} --- !u!222 &1810192567222761768 CanvasRenderer: @@ -2962,8 +2962,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 138.5, y: 0} - m_SizeDelta: {x: -257, y: 200} + m_AnchoredPosition: {x: 133.5, y: 0} + m_SizeDelta: {x: -267, y: 200} m_Pivot: {x: 0.5, y: 1} --- !u!222 &7088085232692116725 CanvasRenderer: @@ -3699,7 +3699,7 @@ RectTransform: m_GameObject: {fileID: 4518815582019590282} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1.0003841, y: 1.0003841, z: 1.0003841} + m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 3278147582056545111} @@ -3707,7 +3707,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 50} + m_SizeDelta: {x: 0, y: 65} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &6145704768400632967 CanvasRenderer: @@ -3744,13 +3744,13 @@ MonoBehaviour: m_BestFit: 0 m_MinSize: 3 m_MaxSize: 40 - m_Alignment: 3 + m_Alignment: 6 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Precautions for use + m_Text: "\u4F7F\u7528\u6CE8\u610F\u4E8B\u9879" --- !u!1 &4573454921397006950 GameObject: m_ObjectHideFlags: 0 @@ -4821,7 +4821,7 @@ RectTransform: m_GameObject: {fileID: 6917935045504300295} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1.0003841, y: 1.0003841, z: 1.0003841} + m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 3278147582056545111} @@ -4866,7 +4866,7 @@ MonoBehaviour: m_BestFit: 0 m_MinSize: 3 m_MaxSize: 40 - m_Alignment: 3 + m_Alignment: 6 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 @@ -6190,7 +6190,7 @@ RectTransform: m_GameObject: {fileID: 7886567206341352097} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1.0003841, y: 1.0003841, z: 1.0003841} + m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 3278147582056545111} @@ -6198,7 +6198,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 50} + m_SizeDelta: {x: 0, y: 65} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &4497555320525880898 CanvasRenderer: @@ -6235,13 +6235,13 @@ MonoBehaviour: m_BestFit: 0 m_MinSize: 3 m_MaxSize: 40 - m_Alignment: 3 + m_Alignment: 6 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Host operation demonstration + m_Text: "\u4E3B\u673A\u64CD\u4F5C\u6F14\u793A" --- !u!1 &7918794169829004587 GameObject: m_ObjectHideFlags: 0 @@ -6355,8 +6355,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 138.5, y: 0} - m_SizeDelta: {x: -257, y: 200} + m_AnchoredPosition: {x: 133.5, y: 0} + m_SizeDelta: {x: -267, y: 200} m_Pivot: {x: 0.5, y: 1} --- !u!222 &4048354058879029441 CanvasRenderer: @@ -6647,8 +6647,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 138.5, y: 0} - m_SizeDelta: {x: -257, y: 200} + m_AnchoredPosition: {x: 133.5, y: 0} + m_SizeDelta: {x: -267, y: 200} m_Pivot: {x: 0.5, y: 1} --- !u!222 &2804598810091052101 CanvasRenderer: diff --git a/Assets/Res/ui/selfpage/设备教学-英文.prefab b/Assets/Res/ui/selfpage/设备教学-英文.prefab index 7bb7b92..857f512 100644 --- a/Assets/Res/ui/selfpage/设备教学-英文.prefab +++ b/Assets/Res/ui/selfpage/设备教学-英文.prefab @@ -110,8 +110,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 138.5, y: 0} - m_SizeDelta: {x: -257, y: 200} + m_AnchoredPosition: {x: 133.5, y: 0} + m_SizeDelta: {x: -267, y: 200} m_Pivot: {x: 0.5, y: 1} --- !u!222 &4286706987362489252 CanvasRenderer: @@ -406,8 +406,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 138.5, y: 0} - m_SizeDelta: {x: -257, y: 200} + m_AnchoredPosition: {x: 133.5, y: 0} + m_SizeDelta: {x: -267, y: 200} m_Pivot: {x: 0.5, y: 1} --- !u!222 &5698031023290239092 CanvasRenderer: @@ -791,8 +791,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 14, y: -25} - m_SizeDelta: {x: 28, y: 33} + m_AnchoredPosition: {x: 13.782178, y: -25} + m_SizeDelta: {x: 27.564356, y: 32.158413} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3713315877446394226 CanvasRenderer: @@ -1200,7 +1200,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} m_AnchoredPosition: {x: 0, y: -900} - m_SizeDelta: {x: 283, y: 54} + m_SizeDelta: {x: 270.22772, y: 54} m_Pivot: {x: 0.5, y: 1} --- !u!222 &6749116875971832376 CanvasRenderer: @@ -1783,7 +1783,7 @@ RectTransform: m_GameObject: {fileID: 1516664462517153640} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1.0003841, y: 1.0003841, z: 1.0003841} + m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 2507257825889193553} @@ -1791,7 +1791,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 50} + m_SizeDelta: {x: 0, y: 65} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &5007429255560638920 CanvasRenderer: @@ -1828,7 +1828,7 @@ MonoBehaviour: m_BestFit: 0 m_MinSize: 3 m_MaxSize: 40 - m_Alignment: 3 + m_Alignment: 6 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 @@ -2125,8 +2125,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 138.5, y: 0} - m_SizeDelta: {x: -257, y: 200} + m_AnchoredPosition: {x: 133.5, y: 0} + m_SizeDelta: {x: -267, y: 200} m_Pivot: {x: 0.5, y: 1} --- !u!222 &6293162583332921233 CanvasRenderer: @@ -4636,8 +4636,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 138.5, y: 0} - m_SizeDelta: {x: -257, y: 200} + m_AnchoredPosition: {x: 133.5, y: 0} + m_SizeDelta: {x: -267, y: 200} m_Pivot: {x: 0.5, y: 1} --- !u!222 &5194366454365047926 CanvasRenderer: @@ -5035,8 +5035,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 138.5, y: 0} - m_SizeDelta: {x: -257, y: 200} + m_AnchoredPosition: {x: 133.5, y: 0} + m_SizeDelta: {x: -267, y: 200} m_Pivot: {x: 0.5, y: 1} --- !u!222 &7508449629764086668 CanvasRenderer: @@ -5268,8 +5268,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 138.5, y: 0} - m_SizeDelta: {x: -257, y: 200} + m_AnchoredPosition: {x: 133.5, y: 0} + m_SizeDelta: {x: -267, y: 200} m_Pivot: {x: 0.5, y: 1} --- !u!222 &2477529860326413848 CanvasRenderer: @@ -5350,8 +5350,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 160, y: -27} - m_SizeDelta: {x: 146, y: 28} + m_AnchoredPosition: {x: 153.61386, y: -27} + m_SizeDelta: {x: 133.22772, y: 25.267326} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1133851846340804323 CanvasRenderer: @@ -5597,8 +5597,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 138.5, y: 0} - m_SizeDelta: {x: -257, y: 200} + m_AnchoredPosition: {x: 133.5, y: 0} + m_SizeDelta: {x: -267, y: 200} m_Pivot: {x: 0.5, y: 1} --- !u!222 &5631228054428128120 CanvasRenderer: @@ -5669,7 +5669,7 @@ RectTransform: m_GameObject: {fileID: 6230294475838562693} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1.0003841, y: 1.0003841, z: 1.0003841} + m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 2507257825889193553} @@ -5677,7 +5677,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 50} + m_SizeDelta: {x: 0, y: 65} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1871753789498795796 CanvasRenderer: @@ -5714,7 +5714,7 @@ MonoBehaviour: m_BestFit: 0 m_MinSize: 3 m_MaxSize: 40 - m_Alignment: 3 + m_Alignment: 6 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 @@ -5939,8 +5939,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 138.5, y: 0} - m_SizeDelta: {x: -257, y: 200} + m_AnchoredPosition: {x: 133.5, y: 0} + m_SizeDelta: {x: -267, y: 200} m_Pivot: {x: 0.5, y: 1} --- !u!222 &3216553163672751951 CanvasRenderer: @@ -6398,8 +6398,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 34, y: -25} - m_SizeDelta: {x: 12, y: 33} + m_AnchoredPosition: {x: 33.30693, y: -25} + m_SizeDelta: {x: 11.485148, y: 32.158413} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &5612710765110576240 CanvasRenderer: @@ -7199,7 +7199,7 @@ RectTransform: m_GameObject: {fileID: 8049253234595512321} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1.0003841, y: 1.0003841, z: 1.0003841} + m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 2507257825889193553} @@ -7244,7 +7244,7 @@ MonoBehaviour: m_BestFit: 0 m_MinSize: 3 m_MaxSize: 40 - m_Alignment: 3 + m_Alignment: 6 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 @@ -7428,8 +7428,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 71, y: -25} - m_SizeDelta: {x: 62, y: 33} + m_AnchoredPosition: {x: 70.0594, y: -25} + m_SizeDelta: {x: 62.0198, y: 32.158413} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &4615438508920603057 CanvasRenderer: @@ -7699,7 +7699,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 0} + m_Material: {fileID: 2100000, guid: cb8235f26ce805647bf4328b64227c7f, type: 2} m_Color: {r: 0, g: 0, b: 0, a: 0.6} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} diff --git a/Assets/Res/ui/videopage/videoPage.prefab b/Assets/Res/ui/videopage/videoPage.prefab index 6af5715..5a8c801 100644 --- a/Assets/Res/ui/videopage/videoPage.prefab +++ b/Assets/Res/ui/videopage/videoPage.prefab @@ -153,7 +153,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 0} + m_Material: {fileID: 2100000, guid: cb8235f26ce805647bf4328b64227c7f, type: 2} m_Color: {r: 0, g: 0, b: 0, a: 0.6} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} @@ -1555,8 +1555,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 34, y: -25} - m_SizeDelta: {x: 12, y: 33} + m_AnchoredPosition: {x: 33.30693, y: -25} + m_SizeDelta: {x: 11.485148, y: 32.158413} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7651326578310032666 CanvasRenderer: @@ -1634,8 +1634,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 71, y: -25} - m_SizeDelta: {x: 62, y: 33} + m_AnchoredPosition: {x: 70.0594, y: -25} + m_SizeDelta: {x: 62.0198, y: 32.158413} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &5439455909549482936 CanvasRenderer: @@ -1713,8 +1713,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 14, y: -25} - m_SizeDelta: {x: 28, y: 33} + m_AnchoredPosition: {x: 13.782178, y: -25} + m_SizeDelta: {x: 27.564356, y: 32.158413} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &9138258466124955313 CanvasRenderer: @@ -2407,7 +2407,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: 263.5, y: -45} + m_AnchoredPosition: {x: 268.099, y: -45} m_SizeDelta: {x: 48, y: 48} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1825978237086955098 @@ -3199,8 +3199,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 381, y: -45} - m_SizeDelta: {x: 139, y: 90} + m_AnchoredPosition: {x: 385.0099, y: -45} + m_SizeDelta: {x: 137.82178, y: 90} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3173438462998470296 CanvasRenderer: diff --git a/Assets/Scripts/Bluetooth/BluetoothManager.cs b/Assets/Scripts/Bluetooth/BluetoothManager.cs index b845271..395ced0 100644 --- a/Assets/Scripts/Bluetooth/BluetoothManager.cs +++ b/Assets/Scripts/Bluetooth/BluetoothManager.cs @@ -79,6 +79,10 @@ namespace Kill.Bluetooth public string ConnectedDeviceAddress { get; private set; } public string ConnectedDeviceMacAddress { get; private set; } // iOS端连接后存储的真实MAC地址 private string aimMac = ""; + /// + /// 是否正处于切换设备流程(ChangeAimMac 触发的断开不应跳转主页) + /// + public bool isSwitchingDevice = false; // 扫描到的设备列表 public List DiscoveredDevices { get; private set; } = new List(); @@ -135,6 +139,9 @@ namespace Kill.Bluetooth private void OnSelfDisconnected(string address) { IsConnected=false; + // 切换设备(ChangeAimMac)导致的断开不跳回主页,避免主页被销毁重建 + if (isSwitchingDevice) + return; // 延迟一下确保主页能读到最新的 IsConnected 状态 if(needBackHome) StartCoroutine(DelayedGoHome()); @@ -830,6 +837,9 @@ namespace Kill.Bluetooth OnConnected?.Invoke(address); + // 新设备连接成功,切换设备流程结束,恢复正常断开行为(意外断开仍跳主页) + isSwitchingDevice = false; + // 请求高吞吐量:MTU 512 + 高优先级连接间隔 BluetoothLEHardwareInterface.RequestMtu(address, 512, (addr, mtu) => { @@ -985,6 +995,13 @@ namespace Kill.Bluetooth DiscoveredDevices.Clear(); Log("断开连接清理完成,可以开始新的扫描"); + + // ChangeAimMac 切换设备时是 Disconnect + StartScan 同步调用, + // 本次清理会停掉刚启动的扫描,这里若仍有连接目标则自动重新扫描,避免连接流程中断 + if (!string.IsNullOrEmpty(aimMac) && !IsConnected) + { + StartScan(10); + } } /// @@ -1121,7 +1138,6 @@ namespace Kill.Bluetooth { // 更新RSSI existingDevice.Rssi = rssi; - // Log($"更新设备信号: {existingDevice.Name} [{effectiveAddress}] RSSI: {rssi}"); } else { @@ -1134,14 +1150,16 @@ namespace Kill.Bluetooth // 添加新设备(Address保留原始值用于Connect,MacFromBroadcast由构造函数自动解析) var newDevice = new BluetoothDevice(address, name, rssi,bytes); DiscoveredDevices.Add(newDevice); - if (aimMac.ToUpper() == effectiveAddress.ToUpper()) - { - StopScan(); - - Connect(address); - } OnDeviceFound?.Invoke(newDevice); } + // 统一检查是否为连接目标:已缓存设备(切换设备场景)也要触发自动连接, + // 否则目标设备已在列表时只更新RSSI,扫描后不会连接,导致连接流程卡住 + if (!IsConnected && aimMac.ToUpper() == effectiveAddress.ToUpper()) + { + StopScan(); + + Connect(address); + } } /// @@ -1177,6 +1195,8 @@ namespace Kill.Bluetooth { if (IsConnected && mac.ToUpper() != (ConnectedDeviceMacAddress ?? ConnectedDeviceAddress).ToUpper()) { + // 标记为切换设备流程:本次断开不触发跳转主页 + isSwitchingDevice = true; Disconnect(); StartScan(10); } diff --git a/Assets/Scripts/UI/Pages/HomePage/HomePageCtrl.cs b/Assets/Scripts/UI/Pages/HomePage/HomePageCtrl.cs index eacd542..b5576b6 100644 --- a/Assets/Scripts/UI/Pages/HomePage/HomePageCtrl.cs +++ b/Assets/Scripts/UI/Pages/HomePage/HomePageCtrl.cs @@ -345,7 +345,12 @@ namespace Kill.UI.Pages { StopCoroutine(bluetoothDeviceInfoCoroutine); } - UIManager.Instance?.OpenMainPage(UIManager.PageName.homePage); + // 设备断开重新加载主页(保持原行为,当前在主页也会重新加载) + // 但切换设备(ChangeAimMac)导致的断开不重新加载,避免主页被销毁重建导致并发初始化 + if (BluetoothManager.Instance == null || !BluetoothManager.Instance.isSwitchingDevice) + { + UIManager.Instance?.OpenMainPage(UIManager.PageName.homePage); + } } private void OnBluetoothError(string error) @@ -1442,6 +1447,9 @@ namespace Kill.UI.Pages ResponseCodeHandler.HandleResponse(response, onSuccess: (data) => { + // 网络回调可能晚于页面销毁返回,判空避免操作已销毁的组件 + if (lastRecordTimeTexts == null) + return; if (data.data.records != null && data.data.records.Count > 0) { RecordData record = data.data.records[0];