Quick question about UI chat box and PTT with Event System

couple of quick questions:

  • how do I clear the chat window between interactions? Is there a way?

  • also, my UI doesnt update with new player name. No matter what I put, it keeps saying “player”

  • If I use the event systems an the startlistening method, how do I stop the listening after say 10 seconds or so?

  • Clearing the chat window: You can check out this thread for details:
    Clear NPC Chatbox UI
    Essentially, you need to destroy the message boxes created under the Content gameobject. Keep in mind that some names may have changed in newer updates, but the approach remains the same.

  • Updating the player name: How are you changing the player’s name?

    • You can press F10, open the Settings Panel, and change it there.
    • Alternatively, go to Resources > ConvaiPlayerDataSO and update the PlayerName field.
  • Stopping listening after 10 seconds: There is a Stop Listening method available, which you can call to achieve this.

Let me know if you need further clarification!

hello and thanks for the chat window code. I’m changing the player name in Unity inspector as I dont want users to have to change name themselves. So trying to just hardcode the name in the apk.

Could you share a screenshot showing how you’re changing the name?

sure standby

Which version of Convai are you using?

Have you modified this script in any way?

no modifications, but I am using an older version of convai as for some reason, the newer version won’t work in MR for me, so I made a a lot of special modifications as Han would say lol just using a version from last July I think.

Have you tried changing the Default Player Name and Player Name in:
Assets/Convai/Resources/ConvaiPlayerDataSO.asset?

I havent tried that. will give it a go

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.