Question about possibility

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Rifin
Posts: 5
Joined: Tue Sep 05, 2023 6:24 pm

Question about possibility

Post by Rifin »

I'm making a text adventure hybrid game where there are also some mini games in separate scenes. I've watched some tutorials but in honesty they do things more complicated than I need and seem to require me to have things like alerts and subtitles and portraits which I do not desire to have. Can you direct me to tutorials which show me how to make my dialogue just as it is in the following video?



The reason I'm using dialogue system for unity, is because I quickly realized that it was going to become way too complicated to implement all the dialogue I had in mind in code alone. I like the node system that has been made for creating dialogue.

Basically I need a variable number of options which can lead to a new instance where there is new orange text and new game objects: the pictures and compute shader particle effects (in world space; they are outside of the canvas—if it matters the canvas is also in world space). Also I will eventually need options which leads to new unity scenes where mini games will be.

Incase it's important, this is for Android
User avatar
Tony Li
Posts: 22115
Joined: Thu Jul 18, 2013 1:27 pm

Re: Question about possibility

Post by Tony Li »

Hi,

Here's a simple example to use as a starting point for discussion:

DS_RifinExample_2023-09-05.unitypackage

I started with the Basic Standard Dialogue UI and moved the panels' layouts. Then I wrote a conversation similar to your video and set up a Dialogue System Trigger set to OnStart to play it.

To keep this example simple, I added the images shown in the right side of your video as Image components in the dialogue UI. The conversation uses SetActive() sequencer commands to change which Image is active.

In your implementation, you could make this a single Raw Image that shows a render texture. Then you could point a secondary camera at something in world space and configure it to render its display to the render texture. This way it can pick up particle effects, 3D models, animation, etc.

You can also use the LoadLevel() sequencer command in your conversation(s) to change scenes.
Rifin
Posts: 5
Joined: Tue Sep 05, 2023 6:24 pm

Re: Question about possibility

Post by Rifin »

Thank you. Yes I think this will work. Im gonna play around with it and I will let you know. Thanks for the very helpful answer!
Rifin
Posts: 5
Joined: Tue Sep 05, 2023 6:24 pm

Re: Question about possibility

Post by Rifin »

Thank you. Yes I think this will work. Im gonna play around with it and I will let you know. Thanks for the very helpful answer!
User avatar
Tony Li
Posts: 22115
Joined: Thu Jul 18, 2013 1:27 pm

Re: Question about possibility

Post by Tony Li »

Glad to help! If you have any follow-up questions, please feel free to ask.
Rifin
Posts: 5
Joined: Tue Sep 05, 2023 6:24 pm

Re: Question about possibility

Post by Rifin »

So everything is working well and the cutscene sequence commands are useful. Now one thing that I have been trying to change is the scroll bar value reset. Every time I click an option, it resets the scroll bar value such that it is at the top of the list. Sometimes this is good, but when the options are still in the same group for example, I don't want the scroll bar to reset. I tried looking through the documentation, but I wondered if you had a quick fix

I also noticed that I am getting pretty low FPS. In your example I was getting 450--although now I notice I am not longer--but somehow after changing everything as desired, I am getting around 60-70. If you know of any obvious setting that might cause this, please let me know
User avatar
Tony Li
Posts: 22115
Joined: Thu Jul 18, 2013 1:27 pm

Re: Question about possibility

Post by Tony Li »

Hi,
Rifin wrote: Sun Sep 10, 2023 5:40 pmNow one thing that I have been trying to change is the scroll bar value reset. Every time I click an option, it resets the scroll bar value such that it is at the top of the list. Sometimes this is good, but when the options are still in the same group for example, I don't want the scroll bar to reset. I tried looking through the documentation, but I wondered if you had a quick fix
Since the response menu buttons are created fresh with every menu, you can only set it to start at the top, start at the bottom, or leave it where it is.

To configure it to start at the bottom, inspect the Response Menu Panel's Standard UI Menu Panel component, and set Button Template Scrollbar Reset Value to zero.

To configure it to stay where it is, set Button Template Scrollbar Reset Value to -1. Then remove the UI Scrollbar Enabler component from the Response Menu Panel.
Rifin wrote: Sun Sep 10, 2023 5:40 pmI also noticed that I am getting pretty low FPS. In your example I was getting 450--although now I notice I am not longer--but somehow after changing everything as desired, I am getting around 60-70. If you know of any obvious setting that might cause this, please let me know
Some things that could bring the framerate to 60-70:
  • Animated characters
  • Post-processing effects
  • Another asset that's setting the target framerate to 60 or 70
  • A script that's doing a lot of processing
There are several other possibilities, too. To identify the culprit, use the Profiler. It's not as intimidating as it seems at first. With a little practice, it will show you what is taking up the time.
Rifin
Posts: 5
Joined: Tue Sep 05, 2023 6:24 pm

Re: Question about possibility

Post by Rifin »

Ok, thank you that is what I was looking for. Now my scroll bar for my options no longer resets when I click a button. Also, I figured out the FPS issue, it was a script I made that set the target FPS to 60--which was intentional for my mobile device, I just didn't expect it to also effect the editor FPS. It was also confusing because the FPS in the editor was 60-70 FPS and the profiler didn't seem to take into account this script for some reason.

Thanks again for your help
User avatar
Tony Li
Posts: 22115
Joined: Thu Jul 18, 2013 1:27 pm

Re: Question about possibility

Post by Tony Li »

Glad to help!
Post Reply