u/Expert_Wishbone_8187

The Making Of: The Village Of Masks

The Making Of: The Village Of Masks

Set in a world of my own making, I am creating a horror-ish game surrounding a mystery in a fantasy-style world. I have made a video on it already, entirely WITHOUT the use of Generative AI, and I'd like to share it with you all. it is also on my YouTube page so if you like the video and want to support the process as I go about it, you can go there too, but that's entirely up to you.

YouTube video: https://youtu.be/EoNg9mgRol8?si=IIE-amvkJoFvZq2h

Thank you to any who watch or support! This is my first time making a public game, and so I want to make sure I get as much feedback as possible so that I can make it as good as possible!

reddit.com
u/Expert_Wishbone_8187 — 6 days ago

Trying to make an automatically scrolling text box which scrolls to the bottom every time a new bit of text is added to it

As the title describes, I am attempting to make a system in my game in which the text box will automatically scroll down any time new text is added to a specific TMPro textmesh object.

In my code for selecting new text options to generate more text (image 1), i have tried using tutorials that suggested using an IEnumerator and forced Canvas Updates to make the ScrollView object scroll based on the ScrollRect component it has inside of the object. However, this results in literally nothing happening; i still have to manually scroll the text box to see what new text was added.

For some reference, you can imagine my text box wanting to scroll like the text boxes in Morrowind, in which you select a dialogue option from the right side of the panel, and the left side of the panel is filled with additional text on top of what was added before, automatically scrolling down to show you all of the new text added if it overwhelms the text box itself.

I have the Dialogue ScrollView object appropriately set with the ScrollRect, as well as the DialogueBox in the content slot of the object itself (Image 2)

I have also set the seemingly appropriate Content Size Fitter and Layout Group components in the Content Object, which is named Dialogue Box (Image 3)

I do not understand why the dialogue box won't autoscroll to the bottom every time new text is added to the box itself, as every unity forum post, reddit post, and youtube video i have thus far referred to has stated the methods I have tried, which work for them but not for me.

Any and all help is appreciated.

Thank you.

Edit: the DiagInit function simply sets the text itself based on what is input for each section, using a += operator to add to the current existing dialogue in the text box. Thus, all the dialogue exists in one text box, again similar to Morrowind

u/Expert_Wishbone_8187 — 13 days ago