Loop through registered DialogueActors

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
fkkcloud
Posts: 298
Joined: Mon Oct 05, 2020 6:00 am

Loop through registered DialogueActors

Post by fkkcloud »

Hello,

How do I loop through registered DialogueActors?

Code: Select all

foreach (var actor in DialogueManager.conversants) { actor.DoSomething();}
I am trying to set some setting for all the registered DialgoueActors` gameObject's custom child component when OnConversationStart or OnConversationEnd.

Thank you,
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Loop through registered DialogueActors

Post by Tony Li »

Hi,

Back up your project and import this patch:

DS_CharacterInfoPatch_2021-12-19.unitypackage

It adds a static method CharacterInfo.GetAllRegisteredActorTransforms().

This addition will also be in version 2.2.24.
fkkcloud
Posts: 298
Joined: Mon Oct 05, 2020 6:00 am

Re: Loop through registered DialogueActors

Post by fkkcloud »

Works great and thank you for the super-fast response/support! (I want to use a proper "cry" emote but it does not exist :cry: )
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Loop through registered DialogueActors

Post by Tony Li »

Glad to help!
Post Reply