From 161ea373e5f1419e2d8c1e6b500e4b542179d8d3 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Fri, 7 Feb 2025 11:15:59 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=97=AA=E7=83=81bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Item/HighLightFlashItem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/Item/HighLightFlashItem.cs b/Assets/Scripts/Item/HighLightFlashItem.cs index eadc7958..e0cf67a8 100644 --- a/Assets/Scripts/Item/HighLightFlashItem.cs +++ b/Assets/Scripts/Item/HighLightFlashItem.cs @@ -16,7 +16,7 @@ public class HighLightFlashItem : MonoBehaviour public void Init(float time, int count = -1, string finishedEvent = null) { high = GetComponent(); - high.outline = 0; + high.outline = 0.01f; dotw = DOTween.To(() => high.outline, (v) => high.outline = v, 1, time).SetEase(Ease.OutFlash).SetLoops(count, LoopType.Yoyo).OnComplete(() => { if (string.IsNullOrEmpty(finishedEvent)==false) From e73daba55f6087c4bb9854e5fd889332e4fdfac2 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Fri, 7 Feb 2025 13:07:29 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E9=AB=98=E4=BA=AE=E6=89=A9=E5=B1=95?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Actions/HighLightAction.cs | 5 +++++ Assets/Scripts/Actions/HighLightFlashAction.cs | 5 +++++ Assets/Scripts/Xml/XmlParser.cs | 10 ++++++++++ Doc/Xml配置文档.xml | 9 ++++++--- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Actions/HighLightAction.cs b/Assets/Scripts/Actions/HighLightAction.cs index 24d390d5..03ae7af9 100644 --- a/Assets/Scripts/Actions/HighLightAction.cs +++ b/Assets/Scripts/Actions/HighLightAction.cs @@ -25,6 +25,7 @@ namespace QFramework bool isHigh = true; string deviceName = string.Empty; string isIndependent; + string visibility; public static HighLightAction Allocate(string path, Dictionary datas, System.Action OnFinished = null) { var retNode = mPool.Allocate(); @@ -45,6 +46,7 @@ namespace QFramework } retNode.deviceName = datas.ContainsKey("deviceName") ? datas["deviceName"] : string.Empty; retNode.isIndependent = datas.ContainsKey("isIndependent") ? datas["isIndependent"] : string.Empty; + retNode.visibility = datas.ContainsKey("visibility") ? datas["visibility"] : string.Empty; retNode.OnFinished = OnFinished; return retNode; } @@ -72,6 +74,9 @@ namespace QFramework var effect = obj.GetOrAddComponent(); effect.outlineColor = color; effect.highlighted = true; + Visibility visibility = Visibility.Normal; + Enum.TryParse(this.visibility, out visibility); + effect.outlineVisibility = visibility; obj.GetOrAddComponent(); if (string.IsNullOrEmpty(isIndependent) == false) { diff --git a/Assets/Scripts/Actions/HighLightFlashAction.cs b/Assets/Scripts/Actions/HighLightFlashAction.cs index 4746f384..71baafb7 100644 --- a/Assets/Scripts/Actions/HighLightFlashAction.cs +++ b/Assets/Scripts/Actions/HighLightFlashAction.cs @@ -28,6 +28,7 @@ namespace QFramework string count; string time; string finishedEvent; + string visibility; public static HighLightFlashAction Allocate(string path, Dictionary datas, System.Action OnFinished = null) { var retNode = mPool.Allocate(); @@ -51,6 +52,7 @@ namespace QFramework retNode.count = datas.ContainsKey("count") ? datas["count"] : string.Empty; retNode.time = datas.ContainsKey("time") ? datas["time"] : string.Empty; retNode.finishedEvent = datas.ContainsKey("finishedEvent") ? datas["finishedEvent"] : string.Empty; + retNode.visibility = datas.ContainsKey("visibility") ? datas["visibility"] : string.Empty; retNode.OnFinished = OnFinished; return retNode; } @@ -79,6 +81,9 @@ namespace QFramework var effect = obj.GetOrAddComponent(); effect.outlineColor = color; effect.highlighted = true; + Visibility visibility = Visibility.Normal; + Enum.TryParse(this.visibility, out visibility); + effect.outlineVisibility = visibility; obj.GetOrAddComponent(); if (string.IsNullOrEmpty(isIndependent) == false) { diff --git a/Assets/Scripts/Xml/XmlParser.cs b/Assets/Scripts/Xml/XmlParser.cs index 6b56db69..fa710f3c 100644 --- a/Assets/Scripts/Xml/XmlParser.cs +++ b/Assets/Scripts/Xml/XmlParser.cs @@ -787,6 +787,11 @@ namespace XMLTool { act.args.Add("isIndependent", isIndependent.Value); } + XAttribute visibility = action.Attribute("visibility"); + if (visibility != null) + { + act.args.Add("visibility", visibility.Value); + } newAction = act; } break; @@ -829,6 +834,11 @@ namespace XMLTool { act.args.Add("finishedEvent", finishedEvent.Value); } + XAttribute visibility = action.Attribute("visibility"); + if (visibility != null) + { + act.args.Add("visibility", visibility.Value); + } newAction = act; } break; diff --git a/Doc/Xml配置文档.xml b/Doc/Xml配置文档.xml index dd234ef5..8d05f154 100644 --- a/Doc/Xml配置文档.xml +++ b/Doc/Xml配置文档.xml @@ -89,14 +89,17 @@ 如果deviceName存在 则不用isDevice --> - - + + - + - Scene + XianWeiJing All 显微镜的使用 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From fe5169e55a56a385fcd169d5892aeeba9fbb3ebe Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Fri, 7 Feb 2025 13:35:33 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=AD=A5=E9=AA=A4?= =?UTF-8?q?=E5=88=97=E8=A1=A8UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Art/UIPrefab/UIOperationList.prefab | 8 ++++---- Assets/Scripts/UI/UIOperationList.cs | 9 ++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Assets/Art/UIPrefab/UIOperationList.prefab b/Assets/Art/UIPrefab/UIOperationList.prefab index e387fe22..1f4d179f 100644 --- a/Assets/Art/UIPrefab/UIOperationList.prefab +++ b/Assets/Art/UIPrefab/UIOperationList.prefab @@ -465,8 +465,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 131.91986, y: 0} - m_SizeDelta: {x: 263.8398, y: -752.1277} + m_AnchoredPosition: {x: 216.55383, y: 0} + m_SizeDelta: {x: 433.1077, y: -752.1277} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &9008854919363526693 CanvasRenderer: @@ -725,7 +725,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 0} - m_RaycastTarget: 1 + m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: @@ -1274,7 +1274,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 + m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: diff --git a/Assets/Scripts/UI/UIOperationList.cs b/Assets/Scripts/UI/UIOperationList.cs index 82693fb9..e767697a 100644 --- a/Assets/Scripts/UI/UIOperationList.cs +++ b/Assets/Scripts/UI/UIOperationList.cs @@ -20,7 +20,7 @@ namespace QFramework.Example protected override void OnInit(IUIData uiData = null) { mData = uiData as UIOperationListData ?? new UIOperationListData(); - TypeEventSystem.Global.Register((arg)=>Hide()).UnRegisterWhenGameObjectDestroyed(gameObject); + TypeEventSystem.Global.Register((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject); } private void OnStepChanged(StepStatusOnChange change) @@ -100,14 +100,17 @@ namespace QFramework.Example subContent.gameObject.SetActive(false); btn.name = btns.Count.ToString(); btns.Add(btn); + arrow.gameObject.SetActive(subContent.transform.childCount > 0); btn.onClick.AddListener(() => { - subContent.SetActive(!subContent.activeSelf); + if (subContent.transform.childCount > 0) + { + subContent.SetActive(!subContent.activeSelf); + } if (op.freeStep) { if (highIcon.color != highColor) { - TypeEventSystem.Global.Send(new StepExecute() { index = int.Parse(btn.name) }); } } From 4adf31b8c167e14f1e74d1555239cb6afbe809fb Mon Sep 17 00:00:00 2001 From: Cg-Fly <1499046294@qq.com> Date: Fri, 7 Feb 2025 13:51:20 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=98=BE=E5=BE=AE?= =?UTF-8?q?=E9=95=9C=E5=9C=BA=E6=99=AF=E4=B8=ADUi=E7=9A=84EventSystem?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scenes/XianWeiJing.unity | 69 --------------------------------- 1 file changed, 69 deletions(-) diff --git a/Assets/Scenes/XianWeiJing.unity b/Assets/Scenes/XianWeiJing.unity index 9b7549a8..2bfab2ee 100644 --- a/Assets/Scenes/XianWeiJing.unity +++ b/Assets/Scenes/XianWeiJing.unity @@ -1051,74 +1051,6 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 14.799, y: -0.838, z: 0} ---- !u!1 &1182150920 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1182150923} - - component: {fileID: 1182150922} - - component: {fileID: 1182150921} - m_Layer: 0 - m_Name: EventSystem - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1182150921 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1182150920} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} - m_Name: - m_EditorClassIdentifier: - m_SendPointerHoverToParent: 1 - m_HorizontalAxis: Horizontal - m_VerticalAxis: Vertical - m_SubmitButton: Submit - m_CancelButton: Cancel - m_InputActionsPerSecond: 10 - m_RepeatDelay: 0.5 - m_ForceModuleActive: 0 ---- !u!114 &1182150922 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1182150920} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} - m_Name: - m_EditorClassIdentifier: - m_FirstSelected: {fileID: 0} - m_sendNavigationEvents: 1 - m_DragThreshold: 10 ---- !u!4 &1182150923 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1182150920} - serializedVersion: 2 - 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: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1547717742 stripped GameObject: m_CorrespondingSourceObject: {fileID: 6139621580806419677, guid: b2eda5b7349633a4fb6d7dde28e9ba8b, type: 3} @@ -1680,4 +1612,3 @@ SceneRoots: - {fileID: 1932366063} - {fileID: 890931923} - {fileID: 1808424890} - - {fileID: 1182150923} From bf6b7c057aa41da3eb16a06dfb46a931f7e19933 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Fri, 7 Feb 2025 14:25:12 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0=E5=AD=90?= =?UTF-8?q?=E6=AD=A5=E9=AA=A4=E6=97=B6bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/UI/UIOperationList.cs | 84 +++++++++++++++------------- 1 file changed, 45 insertions(+), 39 deletions(-) diff --git a/Assets/Scripts/UI/UIOperationList.cs b/Assets/Scripts/UI/UIOperationList.cs index e767697a..29aed0e8 100644 --- a/Assets/Scripts/UI/UIOperationList.cs +++ b/Assets/Scripts/UI/UIOperationList.cs @@ -7,6 +7,7 @@ using TMPro; using System.Collections.Generic; using static OperationController; using System; +using UnityEditor.Hardware; namespace QFramework.Example { public class UIOperationListData : UIPanelData @@ -88,57 +89,62 @@ namespace QFramework.Example StepContent.RemoveAllChildren(); foreach (var item in op.Steps) { - GameObject obj = GameObject.Instantiate(Step.gameObject, StepContent); - Transform title = obj.transform.Find("Title"); - var name = title.Find("Name").GetComponent(); - name.text = item.Name; - var arrow = title.Find("Arrow").transform; - Image highIcon = title.Find("HighIcon").GetComponent(); - Color highColor = new Color(25f / 255f, 224f / 255f, 224f / 255f); - GameObject subContent = obj.transform.Find("SubContent").gameObject; - Button btn = title.GetComponent