RunOptions(DialogueOption[],Action<int>)
Last updated
Was this helpful?
Last updated
Was this helpful?
Method in
Called by the to signal that a set of options should be displayed to the user.
This method is called when the Dialogue Runner wants to show a collection of options that the user should choose from. Each option is represented by a object, which contains information about the option.
When this method is called, the Dialogue View should display appropriate user interface elements that let the user choose among the options.
After this method is called, the will wait until the onOptionSelected
method is called.
After calling the onOptionSelected
method, the Dialogue View should dismiss whatever options UI it presented. The Dialogue Runner will immediately deliver the next piece of content.
When the Dialogue Runner delivers Options to its Dialogue Views, it expects precisely one of its views to call the onOptionSelected
.
If your scene includes no dialogue views that override , the Dialogue Runner will never be told which option the user selected, and will therefore wait forever.
If your scene includes multiple dialogue views that override , they will all receive a call each time the dialogue system presents options to the player. You must ensure that only one of them calls the onOptionSelected
method.
The set of options that should be displayed to the user.
Action<int>
onOptionSelected
A method that should be called when the user has made a selection.
dialogueOptions