Is it possible to run a specific method each time the actor (speaker of the entry) changes during a conversation?

Code: Select all
Transform currentSpeakerTransform = null;
...
void OnConversationLine(Subtitle subtitle)
{
if (subtitle.speakerInfo.transform != currentSpeakerTransform)
{
currentSpeakerTransform = subtitle.speakerInfo.transform;
Debug.Log("New speaker: " + subtitle.speakerInfo.Name);
}
}