Get emphasis value via script

Announcements, support questions, and discussion for the Dialogue System.
mac
Posts: 81
Joined: Sat Aug 22, 2020 7:54 pm

Re: Get emphasis value via script

Post by mac »

Hey Tony, the update is out already, right?
In order to not lose my custom UI with the update, all I have to do is have my template as a separate Prefab, right? Just double checking to make sure I don't mess up stuff. Of course I will also back up my whole project before updating.
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Get emphasis value via script

Post by Tony Li »

Yes, that's correct.
mac
Posts: 81
Joined: Sat Aug 22, 2020 7:54 pm

Re: Get emphasis value via script

Post by mac »

Alright Tony, updated and now the characters focus and unfocus correctly like they should. Thank you

Now how would I be able to increase the portrait frame and image size when a character focus? I tried editing the Focus animation inside the Canvas Group Animator Controller, but it seems I can't edit it directly.
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Get emphasis value via script

Post by Tony Li »

Hi,

You can edit the animation in the Animation window. Try these steps:

1. Inspect a GameObject that has an Animator whose animations you want to edit, such as the VN Template Standard Dialogue UI's Subtitle Panel 0.

2. Open the Animation window. (Press Ctrl+6 or menu item Window > Animation > Animation.)

3. The dropdown should show the animation clips that are assigned to the Animator's animator controller, such as Show Color, Focus Color, Hide, etc. You can edit the animation in the Animation window. (info)
mac
Posts: 81
Joined: Sat Aug 22, 2020 7:54 pm

Re: Get emphasis value via script

Post by mac »

Oh, Thank you Tony, I was trying to edit Focus Animation sheet by clicking the portrait image, and not the object containing the animator, thats why it wasn't working before :x

One thing though, I tried replacing the unfocus transparency with making the sprite darker instead, and it seems that this effect doesn't happen to the portrait unless it has been on focus before, as you can see in the screenshot here. The character on the left gets darker like it should because this character was focused before, the character on the right never gets focused, so it stays like that.
Attachments
Screenshot_2.png
Screenshot_2.png (352.2 KiB) Viewed 986 times
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Get emphasis value via script

Post by Tony Li »

Hi,

The "VN Template Standard Dialogue UI" prefab uses a Portrait Animator Controller that darkens portrait images. If you're not using that already, it may be a helpful example.

Keep an eye on the Animator during play. You'll be able to see what state it's in. Depending on how your Animator is set up, you may need to adjust the transitions.
mac
Posts: 81
Joined: Sat Aug 22, 2020 7:54 pm

Re: Get emphasis value via script

Post by mac »

Show Animation also messed with transparency, so there we go, fixed, thanks Tony.
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Get emphasis value via script

Post by Tony Li »

Glad to help! :-)
mac
Posts: 81
Joined: Sat Aug 22, 2020 7:54 pm

Re: Get emphasis value via script

Post by mac »

Hey Tony! Is the Icon package you created for this case (You can download the package in your third reply here.) not compatible with Wheel Dialogue? Because I did everything as supposed to, but when the response wheel shows up, the replies don't come along, the proper replies are ignored and overwritten by the default 'Response X' text, as you can see here:

Screenshot_7.png
Screenshot_7.png (482.05 KiB) Viewed 879 times
(Just FYI, this response panel should have only two replies, but the other ones are showing up for some reason).
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Get emphasis value via script

Post by Tony Li »

Hi,

It should be compatible with the wheel UI.

It looks like the conversation isn't using that menu panel at all. Is it assigned to the Standard Dialogue UI component's Menu Panels list and Default Menu Panel field?

Did you change the Response Menu Panel to use IconMenuPanel and the six buttons to use IconResponseButton?

Are there any errors or warnings in the Console window?
Post Reply