PlayerController
Module: Inworld.AI.
Namespace: Inworld.Sample.
Inherited from SingletonBehavior.
This singleton gameObject is the demo example for how to interact with Inworld. For developers please feel free to create your own.
Variables
Variable | Description |
---|
UIKey | The KeyCode for opening the global chat panel. By default it's the ~ key. |
OptionKey | The KeyCode for opening the config panel. By default it's the ESC key. |
SkipKey | The KeyCode for enabling skip utterances globally. By default it's not set. |
ContinueKey | The KeyCode to manually move to the next sentence in a conversation. By default it's not set. |
InputField | The input field for players to input texts. |
DropDown | The drop down button for selecting InworldCharacters in the global chat panel. |
SendButton | The button to send texts. |
RecordButton | The button hold to push-to-talk, and release to send the audio. |
Properties
Properties | Description |
---|
IsAnyCanvasOpen | Get if any canvas is open. |
Events
Events | Description |
---|
onPlayerSpeaks | Triggers when the text was sent by player, or when the speech-to-text was received. |
API
Function | Description | Parameters |
---|
SendText | Send target message in the input field. | |
SelectCharacterByDropDown | Select the character by the default dropdown component. | nIndex: the index of the character selecting drop down. |
OpenFeedback | Interface for opening the feedback dialog. It'll be implemented in several Inworld child classes. | interactionID: the InteractionID of the target Interaction. correlationID: the CorrelationID of the target Interaction. |