You can achieve this with TMPro.
"take the eyeglasses and <link="look"><b>look</b></link> around to find something, then step back and <link="quit"><b>quit</b></link>"
use this script on an TMPro object, then use some PlayMaker logic to read the ID with get property.
// from https://forum.unity.com/threads/clickable-link-within-a-text.910226/
// post #17 with some tweaks for the word, you can use get property on PM to get the clicked word...
using UnityEngine;
using TMPro;
using UnityEngine.EventSystems;
using UnityEngine.InputSystem;
[RequireComponent(typeof(TMP_Text))]
public class LinkOpener : MonoBehaviour, IPointerClickHandler
{
private TMP_Text m_textMeshPro;
public Camera MyCamera;
public string LinkedWord;
void Start()
{
m_textMeshPro = GetComponent<TMP_Text>();
}
public void OnPointerClick(PointerEventData eventData)
{
int linkIndex = TMP_TextUtilities.FindIntersectingLink(m_textMeshPro, new Vector3(Mouse.current.position.x.ReadValue(), Mouse.current.position.y.ReadValue(), 0), MyCamera);
if (linkIndex != -1)
{
TMP_LinkInfo linkInfo = m_textMeshPro.textInfo.linkInfo[linkIndex];
//Application.OpenURL(linkInfo.GetLinkID());
//Debug.Log("word is: " + linkInfo);
Debug.Log(linkInfo.GetLinkID());
LinkedWord = linkInfo.GetLinkID();
}
}
}