Smooth nodes transition

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Smooth nodes transition

Post by Tony Li »

Posting here is good whenever you find a bug. If you prefer to email tony (at) pixelcrushers.com or PM me, that's fine, too.

It's designed to start scrolling back down whenever new text is being shown. Otherwise the player wouldn't know that new text is being added at the bottom. But when it's waiting for the player to choose a response, you should be able to scroll back and the scroll position will stay where you put it. Is this not the way you think it should work?
User avatar
Kole90
Posts: 43
Joined: Wed Nov 08, 2017 4:51 am

Re: Smooth nodes transition

Post by Kole90 »

Actually it doesn't work like that at my end. When you are waiting for the player to choose a response and try moving the scroll handle it automatically starts scrolling back down to the responses.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Smooth nodes transition

Post by Tony Li »

I just put a fix on the Extras page. You can also download it here.

I was counting on the scroll bar to get to "approximately zero" left to scroll to know when to stop, and in some cases it never quite got there, thinking it was done at ~0.00000001 left to scroll. I just needed to set the threshold a little higher.
User avatar
Kole90
Posts: 43
Joined: Wed Nov 08, 2017 4:51 am

Re: Smooth nodes transition

Post by Kole90 »

Hey thanks a lot Tony! Sorry to bother you with these issues.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Smooth nodes transition

Post by Tony Li »

No worries; thanks for finding and reporting that issue. If you run into any others, just let me know.
User avatar
Kole90
Posts: 43
Joined: Wed Nov 08, 2017 4:51 am

Re: Smooth nodes transition

Post by Kole90 »

Hey Tony, was just wondering if I could use this Subsurface similar plugin with TextMesh Pro? I've imported the TextMesh Pro support package from the Extras page but not sure how to go on from there? Thanks :)
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Smooth nodes transition

Post by Tony Li »

Hi,
Kole90 wrote: Mon Aug 13, 2018 5:39 am Hey Tony, was just wondering if I could use this Subsurface similar plugin with TextMesh Pro? I've imported the TextMesh Pro support package from the Extras page but not sure how to go on from there? Thanks :)
It would require a moderate amount of scripting. The Subsurface example was written to work with UnityUIDialogueUI (i.e., UI Text). Going forward, new examples will use StandardDialogueUI, which can use UI Text or TextMesh Pro interchangeably. As time allows, I'll try to update the existing examples to use StandardDialogueUI, too.
User avatar
Kole90
Posts: 43
Joined: Wed Nov 08, 2017 4:51 am

Re: Smooth nodes transition

Post by Kole90 »

Good to know, will continue to use regular text for the current project then, thanks for the response!
User avatar
Kole90
Posts: 43
Joined: Wed Nov 08, 2017 4:51 am

Re: Smooth nodes transition

Post by Kole90 »

Hey Tony,

I ran into an issue again while using this subsurface similar plugin. So apparently if you get descent amount of text in the scrollview, framerate starts dropping while the text tries to scroll all of the generated text on top while inserting new node in, as well as even bigger framerate when the new responses appear after the NPC finishes it's part. My question is did you have problems like this before? My idea involves deleting or hiding nodes when there are like 50 or more of them or telling our narrative designer to split up large conversations in two, but maybe you have some better idea?
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Smooth nodes transition

Post by Tony Li »

Hi,

Unity UI's scroll rect struggles when there's a lot of content.

If you inspect the Dialogue UI, you can set Max Messages to a non-zero value. It will keep this many messages and let the others scroll off the top. Try a value like 100 and see how it performs on your target devices. Then adjust the value up or down to your liking. That's probably all you need to do to address the issue. It will also make your saved games a little smaller because each conversation will keep only a certain maximum amount of history.

You can also squeeze more performance out of the UI by simplifying your NPC Message Template and PC Message Template. In the basic Textline package, they may have more UI elements and layout components than you need. Try to remove Horizontal/Vertical Layout Group and Content Size Fitter components, and any GameObejcts that you may not be using, such as the Spacer Panel. The leaner you can make each template, the faster it will be.
Post Reply