diff --git a/Assets/Art/UIPrefab/UIInstruction.prefab b/Assets/Art/UIPrefab/UIInstruction.prefab index 08c7c14a..873108a6 100644 --- a/Assets/Art/UIPrefab/UIInstruction.prefab +++ b/Assets/Art/UIPrefab/UIInstruction.prefab @@ -468,6 +468,7 @@ MonoBehaviour: Training: {fileID: 2329671978117574524} Operation: {fileID: 616562839221942952} TrainContent: {fileID: 5869372504899619242} + ContentText: {fileID: 2630179459340483145} OperationContent: {fileID: 3768800539522999701} ConfirmBtn: {fileID: 783019177237190269} --- !u!1 &2550146359932684284 @@ -1805,6 +1806,7 @@ GameObject: - component: {fileID: 1747114938129779637} - component: {fileID: 6155234247361610581} - component: {fileID: 2630179459340483145} + - component: {fileID: 956712290457367647} m_Layer: 5 m_Name: ContentText m_TagString: Untagged @@ -1928,6 +1930,22 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!114 &956712290457367647 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8301949965222141633} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0d51f3a7c41ab0346b49ae50d456bece, type: 3} + m_Name: + m_EditorClassIdentifier: + MarkType: 0 + CustomComponentName: + CustomComment: + mComponentName: TMPro.TextMeshProUGUI --- !u!1 &8662634946358023954 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/UI/UIInstruction.Designer.cs b/Assets/Scripts/UI/UIInstruction.Designer.cs index 605a53d9..14859343 100644 --- a/Assets/Scripts/UI/UIInstruction.Designer.cs +++ b/Assets/Scripts/UI/UIInstruction.Designer.cs @@ -5,7 +5,7 @@ using QFramework; namespace QFramework.Example { - // Generate Id:b1c63efb-a7a0-4270-8cd9-08f25e4d69b5 + // Generate Id:031f03df-56cd-4f22-b0e4-b4cc8ddb2f1a public partial class UIInstruction { public const string Name = "UIInstruction"; @@ -17,6 +17,8 @@ namespace QFramework.Example [SerializeField] public RectTransform TrainContent; [SerializeField] + public TMPro.TextMeshProUGUI ContentText; + [SerializeField] public UnityEngine.UI.Image OperationContent; [SerializeField] public UnityEngine.UI.Button ConfirmBtn; @@ -28,6 +30,7 @@ namespace QFramework.Example Training = null; Operation = null; TrainContent = null; + ContentText = null; OperationContent = null; ConfirmBtn = null; diff --git a/Assets/Scripts/UI/UIInstruction.cs b/Assets/Scripts/UI/UIInstruction.cs index aa7d6981..b936f544 100644 --- a/Assets/Scripts/UI/UIInstruction.cs +++ b/Assets/Scripts/UI/UIInstruction.cs @@ -2,6 +2,7 @@ using UnityEngine; using UnityEngine.UI; using QFramework; using TMPro; +using System.Diagnostics.Eventing.Reader; namespace QFramework.Example { @@ -47,6 +48,15 @@ namespace QFramework.Example protected override void OnOpen(IUIData uiData = null) { + if (string.IsNullOrEmpty(Global.Instance.curModule.Descript)) + { + + ContentText.text = "没有Descript相关配置"; + } + else + { + ContentText.text = Global.Instance.curModule.Descript; + } } protected override void OnShow() diff --git a/Assets/Scripts/Xml/XmlParser.cs b/Assets/Scripts/Xml/XmlParser.cs index 970508a6..20dcf3f9 100644 --- a/Assets/Scripts/Xml/XmlParser.cs +++ b/Assets/Scripts/Xml/XmlParser.cs @@ -22,6 +22,7 @@ namespace XMLTool public string type { get; set; } public string Scene { get; set; } public string ModuleName { get; set; } + public string Descript { get; set; } public List Operations { get; set; } public List Devices { get; set; } @@ -186,6 +187,7 @@ namespace XMLTool // 解析模块名称 module.type = moduleElement.Element("Type")?.Value; module.ModuleName = moduleElement.Element("Name")?.Value; + module.Descript = moduleElement.Element("Descript")?.Value; module.Scene = moduleElement.Element("Scene")?.Value; // 解析设备 diff --git a/Doc/Xml閰嶇疆鏂囨。.xml b/Doc/Xml閰嶇疆鏂囨。.xml index c8c19d72..08b2837f 100644 --- a/Doc/Xml閰嶇疆鏂囨。.xml +++ b/Doc/Xml閰嶇疆鏂囨。.xml @@ -156,6 +156,10 @@ 妯″潡1 + +杩欓噷鏄疄璁弿杩板唴瀹..... +宸存媺宸存媺.... + 缁勭粐閽