Page 1 of 1

Custom sequence: How get current Subtitle Panel transform?

Posted: Fri Nov 05, 2021 7:39 pm
by Strook
Hello,

I'm writing a custom sequence to shake the position of the current Subtitle panel (using DoTween)

How can I get a reference to transform of the currently open subtitle panel? I tried a bunch of thing but I can't wrap my head around how to do it :shock:

Thanks!

Re: Custom sequence: How get current Subtitle Panel transform?

Posted: Fri Nov 05, 2021 9:34 pm
by Tony Li
Hi,

Try this:

Code: Select all

DialogueActor dialogueActor;
var panel = DialogueManager.standardDialogueUI.conversationUIElements.standardSubtitleControls.GetPanel(
    DialogueManager.currentConversationState.subtitle, out dialogueActor);

Re: Custom sequence: How get current Subtitle Panel transform?

Posted: Sat Nov 06, 2021 7:54 pm
by Strook
works like a charm, thanks!

Re: Custom sequence: How get current Subtitle Panel transform?

Posted: Sat Nov 06, 2021 9:04 pm
by Tony Li
Happy to help!