Forum rules - please read before posting.

Subtitles scrolling text from left with Middle Text Alignment

Setting the Subtitles to middle and activating the scrolling option starts scrolling from the middle and stretches out as the sentence progresses. It is kind of disorienting and makes text hard to read as text appears and moves to side with every word.
Is there a way to keep the scrolling from the left while the text is aligned in the middle?


  • The Text alignment will need to be set to Left for the scrolling to start on the left. Where are you trying to centre the text to? The centre of the screen?

    You can use the Position/Size fields of both the Menu and the Label element that displays the subtitle text to centre the label where you want.

    Having the menu's Size be Automatic, and still scroll from the left, is tricky because the menu needs to know the final size of the subtitle box in advance, so that it can re-size to fit the text before it's complete.

    To do that, you'd need to switch your Menu's rendering to Unity UI (see the Manual's "Unity UI menus" for more on this topic), and then rely on e.g. a Content Size Fitter component to have your menu's "RectTransform" expand dynamically to fit the content within it.

    What you can then do is create a second label / Text UI component in the Canvas that basically sets itself to the completed speech text as soon as the speech begins. This would be invisible (i.e. a zero Alpha value), so that the RectTransform expands to fit the final line, before the scrolling completes. Hooking into the OnStartSpeech custom event can help you set the "dummy" Text box's contents to the finished speech:

    public UnityEngine.UI.Text dummyText;
    private void StartSpeech (AC.Char character, string lineText, int lineID)
        dummyText.text = lineText;
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.
Do NOT follow this link or you will be banned from the site!