Unraed Docs

Documentation for Unraed plugins and projects

Click here to return to table of contents.

Dialogue Tree: Dialogue Asset

Extends: UObject

Dialogue asset that governs the flow of a single conversation.

Contents

  1. Blueprint Callable Methods

1. Blueprint Callable Methods

The following methods can be called but not overridden from Blueprint.

Set Speaker (BlueprintCallable)

/**
* Sets the component value associated with the given name 
* to the provided speaker component. BlueprintCallable. 
* 
* @param InName - FName, the dialogue's name for the speaker. 
* Can differ from the component's display name. 
* @param InSpeaker - UDialogueSpeakerComponent*, the component 
* associated with the speaker. 
*/
void SetSpeaker(FName InName, UDialogueSpeakerComponent* InSpeaker);


Get Speaker (BlueprintCallable, Pure)

/**
* Retrieves the speaker component associated with the given 
* name by the dialogue. BlueprintCallable. 
* 
* @param InName - FName, name associated with the desired 
* speaker
* @return UDialogueSpeakerComponent*, component associated with 
* the given speaker name. Nullptr if none found. 
*/
UDialogueSpeakerComponent* GetSpeaker(FName InName) const;


Get All Speakers (BlueprintCallable, Pure)

/**
* Retrieves the entire map of expected speaker names to their 
* speaker components. 
* 
* @return TMap<FName, UDialogueSpeakerComponent*>, the map of 
* speaker names to components. 
*/
TMap<FName, UDialogueSpeakerComponent*> GetAllSpeakers() const;


Clear Node Visits (BlueprintCallable)

/**
* Clears the "visited" status of all nodes in the graph. 
*/
void ClearVisitedNodes();


Get Node Visits (BlueprintCallable, BlueprintPure)

/**
* Extracts the dialogue's visited nodes as a struct. Useful for 
* saving. 
* 
* @return FDialogueNodeVisits - the visited nodes struct. 
*/
FDialogueNodeVisits GetVisitedNodes() const;


Import Node Visits (BlueprintCallable)

/**
* Applies a record of visited nodes to the dialogue. Any non-matching 
* node IDs will not be applied. Will not "unvisit" nodes that have been
* separately visted by the dialogue. 
* 
* @param InNodeVisits - const FDialogueNodeVisits&, the visited nodes 
* struct.
*/
void ImportNodeVisits(const FDialogueNodeVisits& InNodeVisits);