Hey everybody!
I would like to render a line between speaker and subtitle instance while a character speaks. I managed to do it for the player inside a OnMenuTurnOn event method that gets called when the menu is shown:
private void OnMenuTurnOn(Menu _menu, bool isInstant)
{
if(_menu.title == "Subtitles")
{
RectTransform menuRectTransform = _menu.rectTransform;
Vector3 startPosition = KickStarter.player.GetSpeechWorldPosition();
_lineDrawer.DrawLine(startPosition, menuRectTransform);
}
}
But I would like to have this for any character that speaks.
Is it possible to get the currently speaking character somehow? Or is there another way to do this?
Any help on this is highly appreciated
Thanks!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
I found it
If anyone can make use of it, here it is: