Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  6. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  7. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  8. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Unity UI What is the best way to go about returning the word clicked, from a single UI text?

Discussion in 'Unity UI & TextMesh Pro' started by joelybahh, May 16, 2018.

  1. joelybahh

    joelybahh

    Joined:
    Mar 18, 2015
    Posts:
    2
    The reason I am asking this is I have some voice to text implemented, and it returns the string for what was said quite reliably.
    However, If the user says a big sentence and realizes one word was misinterpreted, they currently have to start again and say that whole phrase over again, resulting in another chance of mis-interpretation.

    Ideally the user will click the word they see as misinterpreted, and just re-say that word.

    I have considered splitting the string by the space character, instantiating buttons with no background, and then placing/spacing them to be restructured back into a sentence of clickable text buttons, which sounds a bit messy.

    Things to consider:
    • This is on a worldspace canvas.
    • The UI interactions are triggered by the user pointing the vr controller at the panel.
    • The standard unity hover, click and unhover events are still called as normal, just on a worldspace panel with VR.

    Has anyone ever done anything like this in the past who can assist?

    Regards,
    Joel - InspaceXR
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    8,127
    Sorry no one replied to this yet. If you can switch to TextMesh Pro, you can check which word was clicked with a single function, as described in this video:


    This blog post has some code examples that might help, too: https://deltadreamgames.com/2018/01/