Problem with the scrollview

Announcements, support questions, and discussion for the Dialogue System.
hapciupalit
Posts: 24
Joined: Tue Nov 28, 2017 10:04 am

Problem with the scrollview

Post by hapciupalit »

So I was modifying the UI for the Quest to play nice with my game, when I found out that the scroll is not working, so I taught that maybe I'm doing something wrong, so I used the default one just to test, and had the same problem.
Here is a link to my problem

https://youtu.be/fbEP2oECA1U

Also I was wondering if it easy to have this UI for the Quests, cuz right now I don't understand quite the way it works, so if it's hard I'll find another solution.

Image

Thank you
User avatar
Tony Li
Posts: 22161
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem with the scrollview

Post by Tony Li »

Hi,

It looks like your ScrollRect and Scrollbar got disconnected.

What version of Unity are you using? I'll post an example that's similar to your screenshot. Is the big white rectangle supposed to be an image? Or more text?
hapciupalit
Posts: 24
Joined: Tue Nov 28, 2017 10:04 am

Re: Problem with the scrollview

Post by hapciupalit »

Hi,

I'm using Unity 2017.2.0f3 Personal Edition.
The white block is an image and actually it should go in the scrollview with the rest of the text.

Also I checked the ScrollRect and I see the correct Scrollbar listed there.
User avatar
Tony Li
Posts: 22161
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem with the scrollview

Post by Tony Li »

Got it. I'll put together an example and send it to you shortly.
hapciupalit
Posts: 24
Joined: Tue Nov 28, 2017 10:04 am

Re: Problem with the scrollview

Post by hapciupalit »

Thank you very much!
I appreciate it
User avatar
Tony Li
Posts: 22161
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem with the scrollview

Post by Tony Li »

Hi,

Here's an example:

[EDIT: Updated link:]
TwoPanelQuestLogWindow_2017-12-15.unitypackage

It looks like this:

Image

It uses a subclass of UnityUIQuestLogWindow to add functionality for two panels (left/right). The code is commented, so you can customize it if you want to change the way it works.
hapciupalit
Posts: 24
Joined: Tue Nov 28, 2017 10:04 am

Re: Problem with the scrollview

Post by hapciupalit »

Thank you very much. This is awesome, and works perfectly for me.
Have a good day
hapciupalit
Posts: 24
Joined: Tue Nov 28, 2017 10:04 am

Re: Problem with the scrollview

Post by hapciupalit »

So I've been working with the example you gave me and it was everything ok until I moved it into my scene in my canvas, and my problem persisted, so I've been trying to understand what was the problem, and went back to the example you gave me, and checked the pixel perfect option on the canvas, and I had the same problem.

Here is a link to the video.

https://youtu.be/VLgXf5nACFE

Do you have any idea what could be the problem?
User avatar
Tony Li
Posts: 22161
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problem with the scrollview

Post by Tony Li »

Interesting. The ScrollRect had an unused Vertical Layout Group. The Pixel Perfect option doesn't like this.

I removed the unused Vertical Layout Group and updated the download link above. It should work now.

In the upcoming version 1.7.7, I'll remove any unsed Vertical Layout Groups from the built-in quest log window prefabs, too.
hapciupalit
Posts: 24
Joined: Tue Nov 28, 2017 10:04 am

Re: Problem with the scrollview

Post by hapciupalit »

Thank you very much, for your help and I hope I didn't disturbed you too much!

Have a good day!
Post Reply