Forum rules - please read before posting.

Unable to get the Chat log to scroll

Hi I'm using the chat log script from the wiki page. I'm having a hard time following the instructions on that page. How can I assign the text box to Auto Scroll Rect field If I place the Text box inside of Content of a ScrollView UI Object? The Auto Scroll Rect is only accepting the ScrollView Object because it has Scroll Rect component. And if I add a Scroll Rect component to the Text box without a ScrollView in my scene it's impossible to make it work as I want it because then I can't use a mask or set the Viewport to what I want. The instructions are not clear enough for me. Please help.

Comments

  • Putting aside any masking for the moment: you don't need to add any other components or move things around. Just create a regular Scroll View from the UI toolbar menu, add a Text component to the Content, and then assign the Scroll View as the Auto Scroll Rect.

  • edited May 2023

    Okay I've tried doing that and it scrolls horizontally and not vertically. Tried doing it freshly in a new scene. Same thing happens. If I don't add the ScrollView to the Auto Scroll Rect I'm able to scroll in all directions but when I add the ScrollView to Auto Scroll Rect the vertical scroll doesn't work. So maybe it has something to do with the script.

  • You'll need to describe the exact behaviour you're getting vs what you're wanting.

    The script is there to be modified if it's not quite what you're looking for, but the behaviour it provides is to automatically scroll the log to the bottom - replacing manual control from the user.

  • I just want the Text to auto scroll to the bottom as the script Auto Scroll Rect intends to do but at the same time I want to allow the players to scroll if they choose, so that they will be able to read the older texts as well. Right now the vertical scroll is not working and the player cannot scroll vertically to read the older text off screen.

  • That functionality needs to be incorporated into the script. I have updated the wiki page.

  • Hi I've updated the script and followed the fresh instructions on the wiki page. But the text is not auto scrolling to the bottom and not letting the player to scroll as it is snapping back to the center. Maybe because it is not respecting the Hight of the text box. The ChatLog script is attached to the Scroll Rect.

  • You will need to share screenshots that show your setup.

    Bear in mind that the player's ability to scroll comes from dragging the ScrollView itself - not the Vertical Scroll Bar.

    Again, please give as much detail as you can regarding how you want the two to behave together. If the player scrolls manually, at what point should the automation kick in? When they let go, or when new speech plays?

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.