Hello!
I want ask about response buttons instantion. Is it possible somehow to spawn instantiated buttons not in one place, but near each other without using Layout Groups? There are a lot of objects in Dialogue UI Panel, so they are moving alongside the response buttons when I am using Layout Groups. It's really hard to sync everything while using them especially with instantiated buttons.
As I understand this part of the Menu Panel code responds for the button instantion, but I wasn't able to modify it accordingly to my needs. Can you help me with this please?
Second question is about Orc Framework. I'm only planning to buy it. Does Dialogue System supports conversations during battles created with Orc? I'm planning to do some kind of tutorial battle.
Question about Instantion
Re: Question about Instantion
Hi,
If you don't want to instantiate buttons, you can create and position buttons at runtime. Assign them to the menu panel's Buttons list.
More details about dialogue UIs: UI Tutorial #1
Layout groups aren't required. When the menu instantiates a response button, it simply makes it a child of the Button Template Holder. If the Button Template Holder happens to have a layout group, that layout group will affect the buttons. If it doesn't have a layout group, that's fine, too.Morgank wrote: ↑Wed Aug 10, 2022 1:02 pm I want ask about response buttons instantion. Is it possible somehow to spawn instantiated buttons not in one place, but near each other without using Layout Groups? There are a lot of objects in Dialogue UI Panel, so they are moving alongside the response buttons when I am using Layout Groups. It's really hard to sync everything while using them especially with instantiated buttons.
As I understand this part of the Menu Panel code responds for the button instantion, but I wasn't able to modify it accordingly to my needs. Can you help me with this please?
If you don't want to instantiate buttons, you can create and position buttons at runtime. Assign them to the menu panel's Buttons list.
More details about dialogue UIs: UI Tutorial #1
Yes, you can do that.
Re: Question about Instantion
Thanks for the reply!
The problem is that I want to instantiate them, so they would overlap the objects with NPC and PC subtitles and this objects could've afterwards overlap the object with responses like on screenshot. New responses will replace old responses if they are not instantiated.
But if Button Template Holder doesn't have the layout group then the response buttons will instantiate in the same spot and the last choice will overlap previous. At least that's how it goes in my case, so I kinda want them to instantiate next to each other, but not at the same spot. I don't understand how to do this at this moment.
Re: Question about Instantion
Hi,
Got it. And to navigate the cards (response buttons), you want to be able to promote one to the front or slide them left/right? If so, perhaps you could use an asset for that, like Card Slider 2D. I've never used Card Slider 2D; I just searched up "cards" on the Asset Store. But presumably you could drop it onto the Button Template Holder to get it to handle the response buttons as cards.
Got it. And to navigate the cards (response buttons), you want to be able to promote one to the front or slide them left/right? If so, perhaps you could use an asset for that, like Card Slider 2D. I've never used Card Slider 2D; I just searched up "cards" on the Asset Store. But presumably you could drop it onto the Button Template Holder to get it to handle the response buttons as cards.
Re: Question about Instantion
Actually, it should be more like on screenshots. Choices should instantiate like this.Tony Li wrote: ↑Wed Aug 10, 2022 3:23 pm Hi,
Got it. And to navigate the cards (response buttons), you want to be able to promote one to the front or slide them left/right? If so, perhaps you could use an asset for that, like Card Slider 2D. I've never used Card Slider 2D; I just searched up "cards" on the Asset Store. But presumably you could drop it onto the Button Template Holder to get it to handle the response buttons as cards.
The chosen response must move to the other cards. Unselected answers must go down and be deactivated.
And onto the card with choice goes card with next subtitle.
So the problem is in placing instantiated responses like on first screenshot. They are all piling on the same place.
Re: Question about Instantion
Create 3 response buttons in the places where you show "No", "Yeah", and "...". Assign the 3 response buttons to the StandardUIMenuPanel's Buttons list.
UNassign the Button Template and Button Template Holder.
Set up a single subtitle panel in the place where you show "Do you like...". Assign it to the StandardDialogueUI's Conversation UI Elements > Default NPC Subtitle Panel and Default PC Subtitle Panel.
Tick the Dialogue Manager GameObject's Display Settings > Subtitle Settings > Show PC Subtitles During Line. UNtick Skip PC Subtitle After Response Menu.
If you need me to put together an example scene that does the above, let me know.
UNassign the Button Template and Button Template Holder.
Set up a single subtitle panel in the place where you show "Do you like...". Assign it to the StandardDialogueUI's Conversation UI Elements > Default NPC Subtitle Panel and Default PC Subtitle Panel.
Tick the Dialogue Manager GameObject's Display Settings > Subtitle Settings > Show PC Subtitles During Line. UNtick Skip PC Subtitle After Response Menu.
If you need me to put together an example scene that does the above, let me know.