I've made floating speech bubbles in my game, but right now I need to have them in a world space and for put a canvas in each of the character game object. I don't think it's an optimal solution.
Here' a video - https://www.youtube.com/watch?v=6JWEm4GHcAA
I wanted to switch to screenspace solution and edited the "Basic Standard Dialogue UI". Everything works, but to position the bubble over the character's head I need to access the actor's game object transform position. How to get the game object of current actor/conversant via script?
Screenspace Bubble Example edit
Re: Screenspace Bubble Example edit
Hi,
The Dialogue System Extras page has an example screen space bubble UI. Go to the page and search for "ScreenSpaceBubbleExample". The example uses a canvas for each speaker, but you can adapt it to use a single canvas for everyone.
If you're using an OnConversationLine(Subtitle) method, the current speaker's transform is subtitle.speakerInfo.transform.
Otherwise, you can check DialogueManager.currentConversationState.subtitle.speakerInfo.transform.
The Dialogue System Extras page has an example screen space bubble UI. Go to the page and search for "ScreenSpaceBubbleExample". The example uses a canvas for each speaker, but you can adapt it to use a single canvas for everyone.
If you're using an OnConversationLine(Subtitle) method, the current speaker's transform is subtitle.speakerInfo.transform.
Otherwise, you can check DialogueManager.currentConversationState.subtitle.speakerInfo.transform.