Activating Unity Event at the Start of Response Menu

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
shounak00
Posts: 1
Joined: Tue Jan 03, 2023 11:36 pm

Activating Unity Event at the Start of Response Menu

Post by shounak00 »

Before choosing a responsse. I want to perform a unity event . How can I do it?
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Activating Unity Event at the Start of Response Menu

Post by Tony Li »

Hi,

Here are two options:

1. If you want to run the UnityEvent before every response menu, you can use a script with an OnConversationResponseMenu() method, like:

Code: Select all

public UnityEvent onStartResponseMenu;

void OnConversrationResponseMenu(Response[] responses)
{
    onStartResponseMenu.Invoke();
}

2. If you want to do something only at the start of a specific response menu, use sequencer commands in a response menu sequence. Inspect the node that precedes the response nodes, and tick Add Response Menu Sequence.
Post Reply