This commit is contained in:
2025-06-26 10:55:14 +08:00
parent 5883801f6e
commit 82ee5f55a3
2 changed files with 3 additions and 7 deletions

View File

@@ -30,10 +30,9 @@ namespace Deconstruction.UI.TmpText
[LabelText("点击超链接时回调")]
#endif
[SerializeField]
private UnityEvent<string> _onClickLink;
public Action<string> onClickLink;
public UnityEvent<string> onClickLink;
/// <summary>
/// 当前摄像机
/// </summary>
@@ -161,7 +160,6 @@ namespace Deconstruction.UI.TmpText
internal void OnAnyLinkClick(string linkID)
{
onClickLink?.Invoke(linkID);
_onClickLink.Invoke(linkID);
Debug.Log($"click link{linkID}");
// 这里不需要处理报错,应当由发送消息的成员处理
}

View File

@@ -26,8 +26,7 @@ namespace Deconstruction.UI.TmpText
[LabelText("点击超链接时回调")]
#endif
[SerializeField]
private UnityEvent<string> _onClickLink;
public Action<string> onClickLink;
public UnityEvent<string> onClickLink;
private void Awake()
{
@@ -54,7 +53,6 @@ namespace Deconstruction.UI.TmpText
try
{
onClickLink?.Invoke(linkID);
_onClickLink.Invoke(linkID);
manager.OnAnyLinkClick(linkID);
}
catch (Exception e)