Sorry Tony,I have a question again...
I want to use custom sequence Command to call current subtitle Panel's Object to call the Animator Component(I put it in the StandardUISubtitlePanel's portrait image) .
So I did not find a direct function to get the subtitle Panel object in the scene.
I know I can get the speaker and get the DialogueActor ,use SubTitlePanelNumber to know current's substilte panel's index.(Default is 0,Panel1 is 1, Panel2 is 2...Etc)
And then I could use "DialogueSystem.DisplaySettings.dialogueUI.GetComponent<StandardDialogueUI>().conversationUIElements.subtitlePanels[the panel's index]"
and use it to get StandardUISubtitlePanel's portrait image....
But.. It was so tired...I think there are some direct way to get this...
How to get the current subtitle Panels' gameObject directly
Re: How to get the current subtitle Panels' gameObject directly
Hi,
If you have a reference to the dialogue UI:
Then you can call GetPanel():
If you have a reference to the dialogue UI:
Code: Select all
StandardDialogueUI dialogueUI = DialogueManager.dialogueUI as StandardDialogueUI;
Code: Select all
Subtitle currentSubtitle = DialogueManager.currentConversationState.subtitle;
DialogueActor dialogueActor;
StandardUISubtitlePanel panel = dialogueUI.conversationUIElements.standardSubtitleControls.GetPanel(currentSubtitle, out dialogueActor);