Use of Subtitle Interactions

Two Questions

  1. Is there a programmatic way to set the chat mode to be subtitle?

  2. Is there a way to clear the subtitle text field. We are building for a public display and want to clear out the last user interaction before the next user comes in.

Hello @chris.raasch,

Welcome to the Convai Developer Forum!

Here’s how you can achieve your goals:

  1. Activate Subtitle Mode:
    In ConvaiChatUIHandler.cs, you can activate the subtitle mode using the following method:
SetUIType(UIType.Subtitle);
  1. Comment Out SaveLoadSystem (Optional):
    If you want to prevent unnecessary persistence, comment out the SaveLoadSystem-related code in the OnEnable and OnDisable methods of ConvaiChatUIHandler.cs.

  2. Clear Subtitle Text Field:
    There isn’t a direct method for clearing the subtitle text field. However, in SubtitleChatUI.cs, you can create a custom method like this:

public void ClearSubtitleText()
{
    _subtitle.SenderTextObject.text = "";  
    _subtitle.MessageTextObject.text = "";
}

Call this method whenever you need to clear the subtitle text fields.

Thanks will try those today and reply with results.

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