fix(ConnectUI): 让连接UI正确显示
This commit is contained in:
@@ -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: []
|
||||
|
@@ -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<PlayerConnectController>(OnGetConnectController);
|
||||
ControllerLocator.Instance.TryGetWait<PlayerWatchModeController>(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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user