NewMyBook/Assets/script/AIquestionAnswer.cs

42 lines
946 B
C#
Raw Permalink Normal View History

2025-03-28 16:07:06 +08:00
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using System.Text.RegularExpressions;
using UnityEngine.Video;
public class AIquestionAnswer : MonoBehaviour, IPointerClickHandler
{
private TextMeshProUGUI m_TextMeshProUGUI;
// Start is called before the first frame update
private void Awake()
{
m_TextMeshProUGUI = GetComponent<TextMeshProUGUI>();
}
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void OnPointerClick(PointerEventData eventData)
{
// <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int linkIndex = TMP_TextUtilities.FindIntersectingLink(m_TextMeshProUGUI, eventData.position, eventData.pressEventCamera);
print(linkIndex);
if (linkIndex != -1)
{
Debug.Log("jjjjjjjjjjjjjjjjjjjj");
}
}
}