Forum rules - please read before posting.

Conversation UI: Button highlight stops working when prefab attached to AC menu.

Hi All!

I work on a VR world space UI and stumble upon a strange behavior.
I have a slightly modified AC's unity conversation prefab: changed text to TextMesh Pro.
I put it in the scene and as it is, and it is working fine.

As soon as I connect it to AC's Conversation Menu, ray casting still works and I can click on a button, and it works, but highlighting (on hover) doesn't work.

You can see that on this video (I select AC's default conversation UI only to detach the one in the scene):
https://imgur.com/a/13rdeQQ

Any ideas why this act like this and how to fix this?

Thanks,
Barnim

Comments

  • Can you share a screenshot of the DialogList element's properties? AC can take control over a Conversation UI Button's colours, but this should only be the case if Mark options already used? is checked.

    If this is unchecked, view one of the Buttons in the Conversation UI Hierarchy and compare its Button component when its linked vs unlinked to AC - is there any difference related to its Color / Transition settings?

  • Mark options already used? is unchecked.

    DialogList:
    https://i.imgur.com/oEcsdcL.png

    Unlinked:
    https://i.imgur.com/WEfoGdW.png

    Linked:
    https://i.imgur.com/JmLkGmR.png

    There is some difference in the Image script. But I'm too newbie to know what to learn from it. When it is linked there is a message "This image doesn't have a border"

  • edited March 2022

    Ah, Source Image is gone when linked. It disappears during runtime and I'm unable to set it to UISprite in the runtime, to check if it works - gets back to None.

  • Try setting your DialogList's Display Type to Text Only. Icon And Text will cause the Image component to be updated with the Conversation icons, even if undefined.

  • It works now!
    Thank you again Chris!
    Do you think it's a bug?

  • Is there a way to keep Conversation UI visible when a Dialog Option is selected, while Player or NPC speaks?

  • Do you think it's a bug?

    No, the behaviour is expected with those settings.

    Is there a way to keep Conversation UI visible when a Dialog Option is selected, while Player or NPC speaks?

    Setting the Appear type to During Conversation will have it close automatically once an option is chosen - because the Conversation is no longer active.

    You can set it instead to Manual to have full control over when it displays, but you'll also have to manually link the Conversation to the Menu so that the DialogList doesn't reset when an option is chosen.

    This script ought to do it:

    using UnityEngine;
    using AC;
    
    public class ManualConversation : MonoBehaviour
    {
    
        public string menuName = "Conversation";
        public string elementName = "DialogList";
    
        private void OnEnable () { EventManager.OnStartConversation += OnStartConversation; }
        private void OnDisable () { EventManager.OnStartConversation -= OnStartConversation; }
    
        private void OnStartConversation (Conversation conversation)
        {
            (PlayerMenus.GetElementWithName (menuName, elementName) as MenuDialogList).OverrideConversation = conversation;
            PlayerMenus.GetMenuWithName (menuName).TurnOn ();
        }
    
    }
    
  • Thanks Chris! This script does the job. And I can easily turn off Conversation UI in the ActionList when I'm ready :) Cool!

    I also managed to hide Timer Slider by adding:
    (PlayerMenus.GetElementWithName(menuName, dialogueTimerElement) as MenuTimer).IsVisible = conversation.isTimed;

    You are the best Chris! And I deeply appreciate your reply on Saturday!
    Thank you! :)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.