Page 1 of 1

Loop through registered DialogueActors

Posted: Sun Dec 19, 2021 5:19 am
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,

Re: Loop through registered DialogueActors

Posted: Sun Dec 19, 2021 8:43 am
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.

Re: Loop through registered DialogueActors

Posted: Sun Dec 19, 2021 6:10 pm
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: )

Re: Loop through registered DialogueActors

Posted: Sun Dec 19, 2021 8:57 pm
by Tony Li
Glad to help!