How do we get the GameObject of an Actor and Conversant when a conversation starts?
I created a subclass of DialogueSystemTrigger and made an override method of DoConversationAction(Transform), and tried to access the actorTransform and conversantTransform in the same way as in the base DoConversationAction method, but it didn't work.
I feel like I'm overthinking this problem, but I couldn't find the answer in a search :/
Getting Actor and Conversant Transforms during Conversation
Re: Getting Actor and Conversant Transforms during Conversation
Hi,
After a conversation has been started, you can check the C# properties DialogueManager.currentActor and DialogueManager.currentConversant. For example, say you're using the special script method OnConversationStart:
After a conversation has been started, you can check the C# properties DialogueManager.currentActor and DialogueManager.currentConversant. For example, say you're using the special script method OnConversationStart:
Code: Select all
void OnConversationStart(Transform actor)
{
Debug.Log("Conversation's actor is: " + DialogueManager.currentActor);
Debug.Log("Conversation's conversant is: " + DialogueManager.currentConversant);
}
Re: Getting Actor and Conversant Transforms during Conversation
Worked like a charm. Thanks Tony!