Skip to main content

Character

The UInworldCharacterComponent implements Inworld::ICharacterComponent and is the default messaging component for an Inworld character. It responsible for getting messages, queueing and passing it to the Playbacks - subcomponents that can handle the messages in different ways.

namespace Inworld
{
class ICharacterComponent
{
public:
virtual void SetAgentId(const FString& InAgentId) = 0;
virtual const FString& GetAgentId() const = 0;
virtual void SetGivenName(const FString& InGivenName) = 0;
virtual const FString& GetGivenName() const = 0;
virtual const FString& GetBrainName() const = 0;
virtual void HandlePacket(std::shared_ptr<Inworld::Packet> Packet) = 0;
virtual AActor* GetComponentOwner() const = 0;
};
}

Agent Info

Get Agent Id

Gets the character's Inworld Agent Id.

Get Agent Id

Get Given Name

Gets the character's Inworld Studio name.

Get Given Name

Interaction

Is Interacting With Player

Gets if the character is interacting with the player.

Is Interacting With Player

On Player Interaction State Changed

Bind an event to notify when the player interacts with the character.

On Player Interaction State Changed

Send Text Message

Sends a message of type text to the character.

Send Text Message

API Send Text Message

Send Custom Event

Sends a custom event to the character.

Send Custom Event

API Send Custom Event

Send Audio Message

Sends a message of type audio to the character.

Send Audio Message

API Send Audio Message

Start Audio Session

Starts an audio session with the character.

Start Audio Session

API Start Audio Session

Stop Audio Session

Stops an audio session with the character.

Start Audio Session

API Stop Audio Session

Emotion

Get Emotional Behavior

Gets the Emotion of the character.

Get Emotional Behavior

Get Emotional Strength

Gets the strength of the Emotional Behavior of the character.

Get Emotional Strength

On Emotional Behavior Changed

Bind an event to notify when Emotional Behavior or Strength has changed.

On Emotional Behavior Changed

Character Playback

Get Playback

Gets the playback component by class.

Get Playback

Playback Types

The types of playback to be created by the Inworld Character Component can be configured in the PlaybackTypes array. These components are created before BeginPlay is called.

See Playback Types.