From 56fab4ede4802eb31197d7653653cfcf8f371279 Mon Sep 17 00:00:00 2001 From: GanX <2423855310@qq.com> Date: Mon, 20 Oct 2025 20:05:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(ConnectUI):=20=E8=AE=A9=E8=BF=9E=E6=8E=A5UI?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scenes/UIScene.unity | 17 +++++++++-------- .../Script/Gameplay/UI/PlayerConnectViewer.cs | 15 ++++++++------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Assets/Scenes/UIScene.unity b/Assets/Scenes/UIScene.unity index a132bb6..2a8c2f1 100644 --- a/Assets/Scenes/UIScene.unity +++ b/Assets/Scenes/UIScene.unity @@ -870,7 +870,7 @@ GameObject: - component: {fileID: 1439567736} - component: {fileID: 1439567735} m_Layer: 5 - m_Name: Output + m_Name: PointA m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -915,7 +915,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Output + m_text: PointA m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 538fd603dd2dddd4daf31aa55f44c7e5, type: 2} m_sharedMaterial: {fileID: -3917370665499528571, guid: 538fd603dd2dddd4daf31aa55f44c7e5, @@ -1163,8 +1163,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: IsOpenOnFirstLoad: 0 - inputText: {fileID: 1852915598} - outputText: {fileID: 1439567735} + pointBText: {fileID: 1852915598} + pointAText: {fileID: 1439567735} --- !u!1 &1852915596 GameObject: m_ObjectHideFlags: 0 @@ -1177,7 +1177,7 @@ GameObject: - component: {fileID: 1852915599} - component: {fileID: 1852915598} m_Layer: 5 - m_Name: Input + m_Name: PointB m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -1222,10 +1222,11 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Input + m_text: PointB m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontAsset: {fileID: 11400000, guid: 538fd603dd2dddd4daf31aa55f44c7e5, type: 2} + m_sharedMaterial: {fileID: -3917370665499528571, guid: 538fd603dd2dddd4daf31aa55f44c7e5, + type: 2} m_fontSharedMaterials: [] m_fontMaterial: {fileID: 0} m_fontMaterials: [] diff --git a/Assets/Script/Gameplay/UI/PlayerConnectViewer.cs b/Assets/Script/Gameplay/UI/PlayerConnectViewer.cs index 85c453f..18729d8 100644 --- a/Assets/Script/Gameplay/UI/PlayerConnectViewer.cs +++ b/Assets/Script/Gameplay/UI/PlayerConnectViewer.cs @@ -9,13 +9,14 @@ namespace UI { public class PlayerConnectViewer : UIBase { - public TMP_Text inputText; - public TMP_Text outputText; + public TMP_Text pointBText; + public TMP_Text pointAText; private PlayerConnectController _playerConnectController; private PlayerWatchModeController _playerWatchModeController; - private void Awake() + protected override void Awake() { + base.Awake(); ControllerLocator.Instance.TryGetWait(OnGetConnectController); ControllerLocator.Instance.TryGetWait(OnGetWatchModeController); } @@ -32,18 +33,18 @@ namespace UI private void UpdateInputText(IConnectable input) { string text = input != null ? input.GetConnectableName() : "None"; - if (inputText != null) + if (pointBText != null) { - inputText.text = "Input: " + text; + pointBText.text = "pointB: " + text; } } private void UpdateOutputText(IConnectable output) { string text = output != null ? output.GetConnectableName() : "None"; - if (outputText != null) + if (pointAText != null) { - outputText.text = "Output: " + text; + pointAText.text = "pointA: " + text; } }