Two Questions
-
Is there a programmatic way to set the chat mode to be subtitle?
-
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.
Two Questions
Is there a programmatic way to set the chat mode to be subtitle?
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:
ConvaiChatUIHandler.cs
, you can activate the subtitle mode using the following method:SetUIType(UIType.Subtitle);
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
.
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.