프로젝트 버전 업그레이드 및 빌드 테스트
This commit is contained in:
@@ -8,10 +8,15 @@ namespace TMPro.Examples
|
||||
|
||||
public TMP_TextEventHandler TextEventHandler;
|
||||
|
||||
private TMP_Text m_TextComponent;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (TextEventHandler != null)
|
||||
{
|
||||
// Get a reference to the text component
|
||||
m_TextComponent = TextEventHandler.GetComponent<TMP_Text>();
|
||||
|
||||
TextEventHandler.onCharacterSelection.AddListener(OnCharacterSelection);
|
||||
TextEventHandler.onSpriteSelection.AddListener(OnSpriteSelection);
|
||||
TextEventHandler.onWordSelection.AddListener(OnWordSelection);
|
||||
@@ -56,8 +61,13 @@ namespace TMPro.Examples
|
||||
|
||||
void OnLinkSelection(string linkID, string linkText, int linkIndex)
|
||||
{
|
||||
if (m_TextComponent != null)
|
||||
{
|
||||
TMP_LinkInfo linkInfo = m_TextComponent.textInfo.linkInfo[linkIndex];
|
||||
}
|
||||
|
||||
Debug.Log("Link Index: " + linkIndex + " with ID [" + linkID + "] and Text \"" + linkText + "\" has been selected.");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user