Comment on page
Convai Environment
The Convai Environment class is used to define what actions are available for the character and what are the objects and other characters in the scene.
Convai Environment is used as input to the
StartTalking()
or SendText()
functions in the Convai Player component, and it allows the character to generate actions.A Convai Environment object must have a Main Character set to be considered valid.

Convai Environment class blueprint functions schematic - Omitting some functions for improved visibility.
Function | Returns | Description |
---|---|---|
CreateConvaiEnvironment() | UConvaiEnvironment* | Creates a Convai Environment object. |
SetMainCharacter(FConvaiObjectEntry InMainCharacter) | void | Assigns the main character initiating the conversation, typically the player character, unless the dialogue involves non-player characters talking to each other. |
AddAction(FString Action) | void | Adds an action to the Environment object |
AddActions(TArray ActionsToAdd) | void | Adds an array of actions to the Environment object |
RemoveAction(FString Action) | void | Remove an action from the environment object. |
RemoveActions(TArray ActionsToRemove) | void | Removes an array of actions from the Environment object |
ClearAllActions() | void | Remove all actions from the Environment object. |
AddObject(FConvaiObjectEntry Object) | void | Adds an object to the Environment object |
AddObjects(TArray ObjectsToAdd) | void | Adds an array of objects to the Environment object |
RemoveObject(FString ObjectName) | void | Remove an object from the environment object. |
RemoveObjects(TArray ObjectNamesToR emove) | void | Removes an array of objects from the Environment object |
ClearObjects() | void | Remove all objects from the Environment object. |
AddCharacter(FConvaiObjectEntry Character) | void | Adds a character to the Environment object |
AddCharacters(TArray CharactersToAdd) | void | Adds an array of characters to the Environment object |
RemoveCharacter(FString CharacterName) | void | Remove a character from the environment object. |
RemoveCharacters(TArray CharacterNamesToRemove) | void | Removes an array of characters from the Environment object |
ClearCharacters() | void | Remove all characters from the Environment object. |
Last modified 8mo ago