Skip to main content

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

VariableDescription
UIKeyThe KeyCode for opening the global chat panel. By default it's the ~ key.
OptionKeyThe KeyCode for opening the config panel. By default it's the ESC key.
SkipKeyThe KeyCode for enabling skip utterances globally. By default it's not set.
ContinueKeyThe KeyCode to manually move to the next sentence in a conversation. By default it's not set.
InputFieldThe input field for players to input texts.
DropDownThe drop down button for selecting InworldCharacters in the global chat panel.
SendButtonThe button to send texts.
RecordButtonThe button hold to push-to-talk, and release to send the audio.

Properties

PropertiesDescription
IsAnyCanvasOpenGet if any canvas is open.

Events

EventsDescription
onPlayerSpeaksTriggers when the text was sent by player, or when the speech-to-text was received.

API

FunctionDescriptionParameters
SendTextSend target message in the input field.
SelectCharacterByDropDownSelect the character by the default dropdown component.nIndex: the index of the character selecting drop down.
OpenFeedbackInterface 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.