[ad_1]
I’m writing a Text-RPG and I’ve arrange a ScrollRect the place new paragraphs and decisions are added and eliminated at each flip. This makes the dimensions of the Content change continuously, which I deal with with a Content Size Fitter.
To stop the participant from shedding monitor of the final paragraph he was studying earlier than making a alternative, I’d wish to hold it in the identical place relative to the display screen it doesn’t matter what modifications within the Content. However, this isn’t doable as a result of clamped setting of the ScrollRect’s Movement Type. I need to hold the clamped habits to forestall countless scrolling, however I must discover a method to make it work whereas preserving the final paragraph’s place.
Here’s a visible illustration of what I’m making an attempt to attain:
Setting the ScrollRect’s Movement Type to unrestricted causes the habits I’m in search of. However, I am unable to enable the content material to be scrolled endlessly. If there’s a workaround for clamping an unrestricted ScrollRect that may very well be an answer… I’d love to listen to about it!
I’ve additionally thought of instantiating an empty block that takes the dimensions of the alternatives block to cowl the area marked in purple. However, that causes extra issues because the participant would possibly choose a alternative whereas the scroll isn’t completely on the backside. I actually do not know learn how to make that work.
[ad_2]

