Actors

Actors are characters that are allowed to participate in a dialogue, they have a portrait, title and can trigger events or be set as the one saying a specific dialogue message. Make sure to add the Actor script on the Player character, and to check is_player, to allow this character to initiate dialogues.

Actor are defined in a scriptableObject (right click -> Create -> DialogueQuests -> Actor). It’s best to put the files in the Resources/Actors folder to have them loaded every scene (see the Loader script in the DQManager to set the path where they are loaded).

Actor ID: a reference unique to each actor, used in the save file.

Is Player: check for the player character.

Animation: It's possible to add an animation to a portrait of an actor. To test the animation while in edit mode, you should set the animator controller on the portrait in the UI (DQUICanvas, set the panel canvas_group alpha value to 1 to make it visible and test the animation).

Load Dialogues: Optional: any prefab set there will be spawned in every scene containing this actor. This allows the creation of events that are not scene dependent. Once your actor data file is defined, you need to add the Actor.cs component to a prefab or object in the scene. And set the right actor data on it.

Last updated